diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b36cc48022..3caddf6622f 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 3e7bd9faddf..e54d8f65e75 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 794c20d2e52..6c6b8199041 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 ffc15257213..cbca36a34ed 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 65baf3860ee..d806afa09f2 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 178c777850e..8d41bb467f5 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 a77fa0678f3..8e875f3d7e8 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 6aa77cf3338..fe1eb67d81a 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 087e3d683b6..105c2d44f61 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 6867e2fd3a4..840ab6c88ad 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 9c529e87e91..3d9977bdd94 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 024801a98bf..a51256132fa 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 a3044f6763a..c6f564c847c 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 ef6bcdd2f06..3bba38974b9 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 5f0eb53f95f..3e0675dcbb6 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 02c87531754..25ce826d870 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 2e6e5980cf7..6ac98aa4581 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 9e80b4063eb..5e36196d079 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 0b5e5a96716..ba486764de0 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 56101f1da92..4fa82968ef6 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 0e372f65074..a74631a60e1 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 946743d9445..a7dce6eb154 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 71a5c950190..00f08bcbd18 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 bad982915b4..1701556b334 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 86edbf5362d..19ba62aacda 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 9169bfcc15d..e7a312ff515 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 1c902d71835..751b286f477 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 889a1aa7dc2..438e2217935 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 02dd7d60409..5c866f50cde 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 5fc0b4bd1de..41932b6cd38 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 36232583063..7acf5b5b9c0 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 d8caedcb79f..aa08325deb3 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 4dd8e885487..78a8d3fab68 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 4ced40e75f2..23063d47ca6 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 a5782f794d2..c638a836a52 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 020103db494..c3470007ab8 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 9397fde43df..ea762217b9b 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 cd1b72c1e19..524182cc970 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 19fc25e00ce..700a627b552 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 16b64a1fbc5..d43d3f272cd 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 aedd85a1cbc..6cd0e9ae90f 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 da989e61f2b..a9565149e37 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 5e1b935e07b..8ff1acaf31e 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 e459172dacd..c1210119e04 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 0d74e1ecd18..0b085810486 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 c6e98879546..e565ee9e319 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 a23756902a8..9f4fc8e084b 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 b9798858270..bd307d95d4b 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 14abfac323d..f3cc3c4bda5 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 52ce3b4c6e3..b226f1f1e71 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 199af139f8d..e54b989495b 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 0baeb303eb3..a347a67e65b 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 a7e3556f63f..76d425a6b9d 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 bb0094c9287..4de72a9a563 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 4c66720906e..c0f00dbcf3f 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 0fcf2f839a6..8c9c90503d4 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 ec04368d8ba..4faf2287b89 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 cb1b8713c9c..8ca7083613e 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 9f98a2b1af9..654d2551629 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 57ba5a4e27d..eba4eed2772 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 0269ff4df8b..92e0065f49f 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 81f82092bfd..8dee9cc3abd 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 ed6069b993a..23c515db586 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 e31ba1d7fef..860978b334d 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 b43c7ee8fab..a000c3303c9 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 1772f952713..dc819b52eb1 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 79704dbfd19..98c1557fce3 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 c8dda0a63bb..a2164ac8ed2 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 3a8ecce44e5..db38575e51e 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 ffb7362db01..976a0e5b758 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 1c86a415521..3eb2c4ca184 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 42767a089d0..9133a78401b 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 7a342c0d56a..3d2c5be92be 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 b83b39034bd..4b4cd57087a 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 c6b3d93917a..62e73b28885 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 c3176a3f1af..5070e70668d 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 6ee256b05ef..23107a6bb62 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 04d4ea9812a..ba96a68fcfe 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 6af1d5c021f..37ff2c7fea5 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 3f549b619c2..5947ed43eb4 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 2cacdf125c1..161b1a1a3cf 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 5b276e2eee3..0a6d5d03113 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 0dfa461b5a2..f35ed91b03f 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 cac2eb44626..2721e2187f3 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 2b474e3e063..f78e7c474e2 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 9ddfd6157d4..0293d43f82c 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 2b474e3e063..f78e7c474e2 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 a74f82ad72e..df28992a942 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 ce0279c5444..700941a53ec 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 7f93706dd29..ff7a4acb906 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 ac0e99e0ceb..80c6b66fcb3 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 423062a8379..1d7122b9351 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 e20590b7143..cc97be86612 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 394786fc033..898a3b62a44 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 43310337d71..b8ba6f52d27 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 3ad48f55ad4..e4872c19017 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 2b474e3e063..f78e7c474e2 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 c6b3218ea75..ec7bd2d1f56 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 ae964f0b65f..473168fdb50 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 bb3c22b56e5..8b06e35bee3 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 d6dc88660c2..9aaae279ed0 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 ae964f0b65f..473168fdb50 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 61d2d0d8e1a..cfb812cc9c7 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 59c239103f4..ecb568428f7 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 27b45079d23..0d240d0ac94 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 319d6463b9e..6421ded259a 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 382ec3f2fa7..c266c4dbeb9 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 3602ee70814..3d00fedc0f4 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 2738d420abe..db7ebeef292 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 fbfdae7eb20..bf775ce8adf 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 a83f6199860..4f82304a231 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 2b474e3e063..f78e7c474e2 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 7a45bd2cd8d..72822828e99 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 2b474e3e063..f78e7c474e2 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 c687282cf13..cf8464c5bdb 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 ce0279c5444..700941a53ec 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 1a42eb92b85..dad995b3307 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 1fc64618765..261caa8bfc8 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 74f81eefccc..b44c18cb34e 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 e20590b7143..cc97be86612 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 2667ba14610..01f2ae32dc6 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 c74dabd649d..6da974c5f8a 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 0f41b12c585..6169307525f 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 2b474e3e063..f78e7c474e2 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 da6165775b8..04a0aa2f852 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 ae964f0b65f..473168fdb50 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 f8f39796538..28fde526ea0 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 55f2e0291d0..70752ba0a13 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 ae964f0b65f..473168fdb50 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 57a165ddd42..e239a6e3c5b 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 ae9cbbb18de..04076a50eae 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 b27fd1bac32..230fc72eb28 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 085989401d1..0a5224e8589 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 3b29c42997d..ef02e3ad766 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 577cef7233e..4a87e029d60 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 1ff502a66d6..ddf05d47b31 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 74b4d956167..e2a6b841a08 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 7f218ccefd8..07b2f8b1553 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 05b5168d699..e388eaeb9b3 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 2b474e3e063..f78e7c474e2 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 88a5fb615b3..a2caef322ae 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 2b474e3e063..f78e7c474e2 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 3518bc7dc56..07f8e229a9f 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 8722c15a2b8..579ff002cec 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 ad6e7d2636f..d4d28c5eb78 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 dfd34067137..17b6d670bc4 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 271ae2b8b93..57e5f543835 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 dfd34067137..17b6d670bc4 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 dab1bcd3183..061b080d502 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 eef010c1409..4b308ef8c3e 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 e7bfc440822..b74324bf579 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 15b35f56c0d..48b520ea9fd 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 a93cdb43a45..5be62c862ac 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 a22132a92ac..e7ad7c837f5 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 f1c95b633dd..79e3ec4a5be 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 c399e008dac..e7cae2252a1 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 8722c15a2b8..579ff002cec 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 e3ea54012a4..98eed1b02db 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 2b474e3e063..f78e7c474e2 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 2d14c6a1551..e0f6d937b8c 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 8722c15a2b8..579ff002cec 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 7c40879a535..d0d1103d557 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 2b474e3e063..f78e7c474e2 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 91a143fa796..a29847d0a26 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 32126bf0f8b..0c15645762a 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 d8a2d9d28af..a3d180c120e 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 342ccfb781e..ebb782ebad8 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 0c9a268fe40..98de868c890 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 21c3ed89ce4..92e5ed0f806 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 c5480dabab4..6ed4294d74e 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 e20590b7143..cc97be86612 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 7f475688ca0..c120283dc1c 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 00b65384ce5..ad30b10b171 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 c679b74e5ec..e9d745084cd 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 2b474e3e063..f78e7c474e2 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 68c94793e85..a4717d236ea 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 e20590b7143..cc97be86612 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 b213684bd4b..a23fc1997bf 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 8fdb187c5a0..273fcd085b0 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 d2faac44c86..1208bee7342 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 2b474e3e063..f78e7c474e2 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 5977cc199c1..c0ebf9855aa 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 2b474e3e063..f78e7c474e2 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 cf691056822..9f62bfe9197 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 bb31cb6217a..7467efa587c 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 adf4d0c779c..329e9d3f681 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 0bdd610b66a..cdad2927cae 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 74bf725c370..bb954c4540c 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 190fbf219bb..0261d88fc5f 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 b0918c3ec28..48bd7b5f6a0 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 8a641e2d196..7cf64805159 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 f43fcdfbd93..45ca76bbd4d 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 e20590b7143..cc97be86612 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 ec56e3bf55c..ba10db1c670 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 6ebb3aafc7c..148e8db64bf 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 51207da44d4..15f62a10b38 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 2b474e3e063..f78e7c474e2 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 c906610bccb..1171e183f40 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 2b474e3e063..f78e7c474e2 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 eb251f0f847..689e51c722a 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 2b474e3e063..f78e7c474e2 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 bff087169d8..0b20e763477 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 8722c15a2b8..579ff002cec 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 8bc91d727d4..8181bc39543 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 dfd34067137..17b6d670bc4 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 a7c78815060..757a81e3714 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 dfd34067137..17b6d670bc4 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 5b1f9b9c4c3..4a84df57e1b 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 bb31cb6217a..7467efa587c 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 b01c415ff5c..a7bcff34296 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 6997ee43b3e..c9eb1a25d7d 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 944e0f424cc..ed0ef8df4c9 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 29e701b4b5e..a2a9294d451 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 4261b3718a0..8d327f2b381 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 dd9f018e60b..01adf32a77d 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 9a3eaf7c932..94d7a2b7a39 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 e20590b7143..cc97be86612 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 dc9704e0bac..6caa0a0b274 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 2d76600577b..a4a301fcf08 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 4d42a1c3215..8648776aaa4 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 2b474e3e063..f78e7c474e2 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 4b8af44ad0b..502c5a09ffe 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 2b474e3e063..f78e7c474e2 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 fdf1c6d1d03..37b9e2141fc 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 2b474e3e063..f78e7c474e2 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 a1eed39e111..9ba578c8fcc 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 8722c15a2b8..579ff002cec 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 a0e551b88bf..ecbc945e272 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 dfd34067137..17b6d670bc4 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 9b659e40c7f..a6731156d69 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 dfd34067137..17b6d670bc4 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 c2fd93944a1..02f95ca8fce 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 bb31cb6217a..7467efa587c 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 c3e5f1f710f..a03e4b2a18a 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 de0a533c59e..da495d9479d 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 90568545406..b5faaaed5ba 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 40f0fe65166..cfaa146603c 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 0d8b3d0bce5..ac20c2feaa2 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 109aa2aaadc..ab5680a39c5 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 e42b481cb20..6fd96044298 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 e20590b7143..cc97be86612 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 749bc578d01..7f2439e3de1 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 396ee959d26..7030bc829cf 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 2fe9e2be4e3..a31272fa389 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 2b474e3e063..f78e7c474e2 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 91f2657d339..973c2f4dfee 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 2b474e3e063..f78e7c474e2 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 20baef31103..0e33be8abf8 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 2b474e3e063..f78e7c474e2 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 cfc6f229388..7b2ea4afaf1 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 8722c15a2b8..579ff002cec 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 356d7ba20d7..d8d9d161788 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 dfd34067137..17b6d670bc4 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 f4ec556e342..ceb38c2a17f 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 dfd34067137..17b6d670bc4 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 1d6bdff0ab5..c3446a7e4fd 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 6faa693279f..c3eb9c5f21e 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 d0a9bfcca91..9a1ac987f85 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 ef2366f78ba..85ce40fb4be 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 24dc61b02e8..97fbb091035 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 d30017a71f5..8edc9c71c63 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 9751ecc0837..a966f8f69d3 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 369a19fffec..19aee353331 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 e20590b7143..cc97be86612 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 23812703859..fc88b91c047 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 e0fee742fd8..d031dd6b35e 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 97e1d202eb5..7344dc88118 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 2b474e3e063..f78e7c474e2 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 9f0f703aa9c..1b55d29b78c 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 2b474e3e063..f78e7c474e2 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 b91545dc98b..911ea642005 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 2b474e3e063..f78e7c474e2 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 63ce18de9a0..5518e1f9c52 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 7b983d64523..6830694f751 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 317b4ef44b1..dcca8b752c5 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 4ad82b3cd13..1d5f4d7939d 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 52d7b6bf37a..59b7a0aff3f 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 40421668d92..d19a221fad7 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 9e307806d73..9276a2462c4 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 25e7f6ff1d2..a285f8ca398 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 96dabd6ae98..87fb7be74d3 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 e20590b7143..cc97be86612 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 b1bdca84196..03ce15ec0f3 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 6fc65bf4983..c1ab01a5ed1 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 6e1d84d778a..e5df1eba1b1 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 2b474e3e063..f78e7c474e2 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 88ab8d63665..8c0c88a6d64 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 f1ee5b7524b..ca8d81e748c 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 1e3a2c32d38..f856f4e1a8e 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 2b474e3e063..f78e7c474e2 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 0eea706a79f..1f20c7c44d4 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 2b474e3e063..f78e7c474e2 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 936dcca095f..ca90db774fa 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 30f6437a533..8fe23c2e45d 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 9a7d615e5f5..d636d0a84df 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 1a42279c362..daf42050f11 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 d2762d9296e..7fd1fc7c3e3 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 3fb5eced234..a605a4bacd3 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 a2e5b4b748d..0b5838250eb 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 e20590b7143..cc97be86612 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 f2b70b48f4a..931c11783f3 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 6ebdca1e99a..60924d30b32 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 6bcccdb484c..55c1d6bdf80 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 2b474e3e063..f78e7c474e2 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 088c55b62b9..b010933d4b8 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 f1ee5b7524b..ca8d81e748c 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 b00c790bea3..e8f87e2dd9b 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 2b474e3e063..f78e7c474e2 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 0a272365530..4977dae3a2a 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 1735c919dfa..90ecc6d2d04 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 5ebb30f470d..89d8d4868ab 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 afefd7894b5..3819eff3c50 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 c5e3e599287..be14f286f30 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 07ae6f15464..e8ec3bf2b81 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 e20590b7143..cc97be86612 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 a015d64eead..54b0d395237 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 c8dffcdf787..f996c3551f8 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 07e58bbd21e..b8ec8ff9d62 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 2b474e3e063..f78e7c474e2 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 8d5633e92b2..65c2af12384 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 2b474e3e063..f78e7c474e2 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 689a1d3fc79..4d1608ad89e 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 2b474e3e063..f78e7c474e2 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 d89764fba79..ed964ecbe8a 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 1735c919dfa..90ecc6d2d04 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 ea1484fe32d..fff908eae2c 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 58d689d30ad..657c4f64fd9 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 73db0982922..de897cec3bd 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 de8233ade4b..dcdd0c5e875 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 e20590b7143..cc97be86612 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 ea94f9a5371..9ea69476fba 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 ac85a0876ec..c644b491b3b 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 0e0f9e2bfd5..0d3926f31ed 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 2b474e3e063..f78e7c474e2 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 b2df8f5e181..0744b3f8d65 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 2b474e3e063..f78e7c474e2 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 911b301cd2b..00a61df4767 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 2b474e3e063..f78e7c474e2 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 56a65819eb5..0b3cd0b891b 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 9123f70c419..e0dcdc7a110 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 e50299bb7ba..eb7d43079f0 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 4b8cd699fd3..be476cfb1e1 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 15d1bd879c7..25079e8810f 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 832af37c03b..15bc5071f02 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 ceb50cabef3..d603a69227d 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 cdd87277e50..303e627bddf 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 9cc6b82f1cd..44f86e16a1c 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 819d8a9a27b..37622df1ae3 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 8722c15a2b8..579ff002cec 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 3439f83ecef..ccfd227ca3f 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 2b474e3e063..f78e7c474e2 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 2a28014f018..dee724a813f 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 2b474e3e063..f78e7c474e2 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 dd8ff5b48a8..7590241c55a 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 8481520e3c9..ff536ec8b25 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 4d635419142..ed25e1580f2 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 cb030f324ad..9b51ac932e9 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 e20590b7143..cc97be86612 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 fe9990088cc..bfb110fc4ec 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 152426ad61a..ec9b8b182ac 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 9e42b318234..61aa351c98c 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 2b474e3e063..f78e7c474e2 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 c4ec5defb1f..6efee2159fe 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 735b2c9691a..2cf7d53da7f 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 8768025974a..f1b40cb3d49 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 68437d3f5b8..9f78fcb8249 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 1c8e79cf57c..67550d0df50 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 4e4a440462f..5deee133821 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 bcd9f7c595f..cd9b8712047 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 2d4b1cbced1..c58afbf3915 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 3ba02007f05..d89626b2af1 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 18a6f7781e0..83639d93cef 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 2b474e3e063..f78e7c474e2 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 32d628d3c0c..88feb083c3e 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 2b474e3e063..f78e7c474e2 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 63d3af71471..7c2bfdf8bbc 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 9f8ac2640cb..4e5d01c99ba 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 d7768d59e28..73fd06a1698 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 fc694d431ab..2b386bbc278 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 2b474e3e063..f78e7c474e2 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 46206667e0e..69d350bf534 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 d11fcc4952f..60493177917 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 65f4b6ccf6a..9924cb70aaf 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 736d3e4baf0..a6e8019b392 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 36b4fc7f80e..67306224f4c 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 9873a8efbd2..66103589899 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 552355ffff7..db1ce0983f7 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 e20590b7143..cc97be86612 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 41542ed4374..fa61e6e4ef4 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 33191724a49..023f4d7c58c 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 02cdcf64310..75fabda0fc7 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 2b474e3e063..f78e7c474e2 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 81a2c54ac21..1d8e655bf90 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 2b474e3e063..f78e7c474e2 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 deaf08155df..3b36a1fae89 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 2b474e3e063..f78e7c474e2 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 f426b334beb..fcf53ca8d6c 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 3817ff41de9..54f32ea233e 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 a0f4f94d07b..ec5ec2c08a3 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 0a3abfec720..22fb0186bc6 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 3f8d67a8287..4093a07d5f9 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 89296ba7022..b9918e7d492 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 e62907cb35b..31374fb4ee6 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 97d65c720d6..c8ec6ede0fa 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 d215a26dffa..eb159046524 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 2e9ff3e407c..dd38cdc94b6 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 22a7e2d3c77..4385a5e1501 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 8fbbfc36c8d..e65f998151a 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 e8a97b2f5a8..46737c7654a 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 833fb1aaa8c..b07e21fd2ba 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 472c0125877..cad0fdc279b 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 f5a44a21db4..ee566c04860 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 2b474e3e063..f78e7c474e2 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 098db6c9dc4..ee14e070c32 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 2b474e3e063..f78e7c474e2 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 734c1a794ad..12f53b9ba1a 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 ce0279c5444..700941a53ec 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 e7402db0a9a..757ab309975 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 cf6c096ec38..19d27ed92e4 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 240c87677da..6d0cddc9c60 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 e20590b7143..cc97be86612 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 645c1e21bfb..b9a5d39e647 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 68061da88f2..e0038e271fe 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 6a563fa9275..dd210f86892 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 2b474e3e063..f78e7c474e2 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 3cee6565b9f..0405b929ad1 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 ae964f0b65f..473168fdb50 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 5f9d22286ba..8cb5450eab8 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 90cc38844d9..54ca36923d9 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 ae964f0b65f..473168fdb50 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 9db19dffb22..f1838afb2ce 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 746af4b38c5..fe6e1c25779 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 158cf59c396..0c0f6488315 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 ab3d968697a..15ed7ac7134 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 715c1cc3dbf..2e9d8361e76 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 979b092a178..9f9f0076644 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 54184ac1ecd..4c491591bc0 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 6f36c5ab362..26e81e670d2 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 ca9fc73e129..5edf7da1e7c 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 0f81cdb0399..cb032c17a1d 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 1332dd8f480..b226fb96528 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 e20590b7143..cc97be86612 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 53a01f84f1c..1c65057f25d 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 026a050d680..25cc563e8d9 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 fa7662a0ee4..fd71c041242 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 2b474e3e063..f78e7c474e2 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 f1d194ff41c..159daf731eb 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 2b474e3e063..f78e7c474e2 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 91b139efb2a..e67c8940f56 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 2b474e3e063..f78e7c474e2 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 37188e5d4e2..8ae55a48010 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 91d3b3e29cd..2d04faeed7b 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 dafdc0e28b2..7b97cfaa116 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 3bde7c8a43d..6bd9350aa24 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 ff167f7ff37..4153d993e18 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 2223befe895..5bb88be7961 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 5f94b32130a..33201a73379 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 bb0de7e4386..e11eac9a88a 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 aa5f6ad0099..9173e9f2b5b 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 7be04af0def..ec52446a868 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 18519299c99..cc6357a104b 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 f34bcf29497..bf8d360a777 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 e20590b7143..cc97be86612 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 0e9fb3405db..e1b5e2fac0b 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 1699fa77ad2..1c4ea2b8ad0 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 752885dec38..1eb26ce1215 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 2b474e3e063..f78e7c474e2 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 50c3d16caee..aaa4ca129e7 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 f1ee5b7524b..ca8d81e748c 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 52126661afc..41062fd4485 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 2b474e3e063..f78e7c474e2 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 405e7222a05..a7dc9463d0f 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 2b474e3e063..f78e7c474e2 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 32527673293..5f6bb1f1e9d 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 3fba9b90da8..714467ed349 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 756a061f1a0..ef9ba52e287 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 6e4ba23e950..f46505c65a7 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 60f0e664fea..1c582281ab9 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 9ba8f9a0433..3fb20f979c4 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 bf46d58bb5c..771dbf1be97 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 4528bbdd1ff..30dd0e3524e 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 e6b2e9096c0..a858148c440 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 ce07a887efa..c68e81a71b1 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 40779280463..a40d325b8a5 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 9efe2d5e3bf..1b19177534c 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 98bcd51c137..05665e2216f 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 59a3f881642..00a11e5390b 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 2b474e3e063..f78e7c474e2 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 1a841012174..32165c89d25 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 2b474e3e063..f78e7c474e2 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 7c43ff99fa9..fab492b9a4b 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 ce0279c5444..700941a53ec 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 5eea701169d..6976fa77b05 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 ddf2495d2d9..a5cfb6928b5 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 c98945bff6f..8f66da20138 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 e20590b7143..cc97be86612 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 05ab514abec..51b0492948f 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 4eb45e70238..83f8ea8573e 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 eb1a9c1402d..312e5736927 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 2b474e3e063..f78e7c474e2 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 a942b5896e6..59487c57e6f 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 1640397aa7f..2afd605560b 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 2f4001cc85e..3f50b9c2c44 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 7e9c849e6ef..cc978496d35 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 d478acc3c2a..15216c7c9b7 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 42cc69f2e3a..8ecfdc740a8 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 45ae5f21c95..fbc61e09cde 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 2b474e3e063..f78e7c474e2 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 e50d253393d..97ee53f1ea3 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 2b474e3e063..f78e7c474e2 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 cedd56ff733..e60bf62cb82 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 a2ca09418fc..2326db9555f 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 ea1172bd317..bd72ebfde79 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 1005dea1b0b..6188f92290c 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 0a4ce3b85b8..9c5f6503bf8 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 d577919e712..d2d9fe1ce1d 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 bd09a52f1c0..0c37246794e 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 1d962228b67..4e6184cedd2 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 6f0b54ed75b..aaac7ac6d49 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 bb0867bc523..428713734dc 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 0cef41f0bed..75d444dbb92 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 41f9eababf3..485f3ed1982 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 842122770c5..950418dfe57 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 e7ae622591c..45f438083fa 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 f35563e787f..c2d1bc144c4 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 41160d59faf..85acd3981cf 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 6e69805fab4..354f6fb9023 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 288a7fadfe3..77d005cd80a 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 ae53e8859fc..a1ed04a04e5 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 fcb620a75eb..152f7a83211 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 b6f48d2a697..adacc146872 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 8722c15a2b8..579ff002cec 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 7e9b0f3d760..3f9ea5b5634 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 8722c15a2b8..579ff002cec 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 ef6682be3be..7d5e69b0226 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 8722c15a2b8..579ff002cec 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 6a437a88d51..ebc01b8d6d9 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 2b474e3e063..f78e7c474e2 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 63989ccdd7a..3b8ebeb2275 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 2b474e3e063..f78e7c474e2 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 abe14468617..40e8bee8889 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 2b474e3e063..f78e7c474e2 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 d5ddfe375c4..ce06c650a7a 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 505fd03f998..0b8a4b7653f 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 f6dcf8ef17d..b6ad6b74b13 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 3f9bbf779dd..0c49afed464 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 2ad2e6a31b7..760bfe8cd47 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 6e694043719..f509be00066 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 fa29490fb74..038026ddad6 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 33d5f3cdaa0..b0aa5becb15 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 c7ceea779b6..edc9609b0fe 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 73e504aaa82..856fe7dbfec 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 867a10eba01..2cbae920419 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 02fac3ff9db..a8f221aeca7 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 7f8de2c6fad..0a49ca36b8e 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 b7c57094513..649c038369f 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 f1d966f3805..1f9d9cd1546 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 8e4826bbb54..70c7820526c 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 832186f522f..467492c573e 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 e20590b7143..cc97be86612 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 1caa4e05f71..c12f10b96ef 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 12c9c0d1a1d..00a6c9534b3 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 d7985da2943..93252f2c8d4 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 2b474e3e063..f78e7c474e2 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 17b1b32fdd7..ca369ff52e2 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 2b474e3e063..f78e7c474e2 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 b1fe9aacd3b..5f50dbe6b5c 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 2b474e3e063..f78e7c474e2 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 b84607e962f..0d06bcdf4b3 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 b7c57094513..649c038369f 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 b7efd330fdf..71e79206d8a 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 eb452611665..751e917a116 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 b0716f8a9e6..4c8685c54de 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 49f512f8e1a..7c2e2a01053 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 97b804c061a..660c0fc55e1 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 de5f6c8c5f9..30a00e8f2df 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 dc021742cc4..a21d1d6e514 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 f2f5243b038..6e88731f4d8 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 d63cafaf8b1..ebe60fa4241 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 2f24c33b388..d8ddf21671d 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 9274b134d01..7e5ec1370fd 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 cd8ee19f6f4..428a0880d16 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 71b5ecdbdd3..7e063be70ea 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 af2a8257bd4..ef317718a4e 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 a5855085098..355e96b1036 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 c6baeb81206..19598f753fb 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 514895bd06f..d604dbda4de 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 dc8384d02f8..5bcb6632e6b 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 086af979cc2..b0a347876e8 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 7b6493418fd..a955d7afbc0 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 ff282484fdc..d61964e82a5 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 fbf0a20b7f7..c8e67f857aa 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 5e50a9c14c7..5a60d019c02 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 f4b15935f3d..5b697a79f24 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 3ca398a3206..4ac574558ce 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 b341f45efcb..e4361359266 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 cca15510a81..32c9fa12554 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 1f90ba94cb0..6b06eb6dbf8 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 081987aefaa..3ded9d8c64d 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 f1500f4c492..2690480e99e 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 63b3c71b3c4..eb7acb8d7ef 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 1292524e0f9..0cd292b5cee 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 b12c165844f..2d362c5b27a 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 65d73f38e01..a0edd668e59 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 c3deb7fbe01..d8deb16481e 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 89cac20f5a9..a9cb1938bc8 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 bc21715b61b..2718dd7ad6f 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 bdc4599445c..ced11bd4064 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 2b474e3e063..f78e7c474e2 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 81a13e5b65b..396c4942370 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 27dfc9e52fb..5e1805d8fa8 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 3cb03c6cbc4..faba6ccb5de 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 e20590b7143..cc97be86612 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 b2026454440..b1df3c2f82a 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 f1ba3651852..f894e50be15 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 382d3ff94f3..e7223e2cb1a 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 2b474e3e063..f78e7c474e2 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 8d4948e3a36..dcbb3bdd67a 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 3daa84b2180..dcabe9a0588 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 fee53e5dac5..d488cfce94a 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 f7e7ce38374..55de2a2da48 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 be44d0c62ff..3b8da4099b9 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 5d36dd6fbcd..2b2123f3dd8 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 86710bdf21c..92dd82d955e 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 79df9326693..0c79216e297 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 cc9047b1826..65747cf58a3 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 36092994b8f..b88f1daf603 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 683194b4d38..83ab62b774e 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 c6f9226f99c..38bd14ede8b 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 eb67ffe6f7c..80e6f890908 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 648b74eeb5a..634bee3340b 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 451048fb0f6..31935632126 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 ce4f319ceee..70013369aa5 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 45a5cdf15ad..7a8c42235de 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 5103c0a7e54..c62c9a5ff08 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 2b474e3e063..f78e7c474e2 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 dffba334e1e..8bbc5f90906 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 be0b2eed719..9dfa47aa1d8 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 9b47548b2da..95be3c0491f 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 5781184b1ae..ef5ae912ec2 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 6215eed6c19..81bca44c9de 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 96a054caa95..5015b494e5f 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 1d0bf3340b3..9a15ea37d29 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 e72518e582a..746d08e807a 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 722461a3440..5721e0b94d9 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 28ca30e2ce7..cc1b8bfbc8d 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 5c94cd79909..6924b8e875f 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 1640397aa7f..2afd605560b 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 9f7b12ff27d..eac10af55a4 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 be0b2eed719..9dfa47aa1d8 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 b4c7d6b76ff..1ee9c7edbb0 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 4bc1c2b0eed..d99b5098741 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 b260365c6cb..8a3ad4cbab4 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 8f66c76a29f..2472db5874b 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 1d0bf3340b3..9a15ea37d29 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 ef45838fc9e..e0e0c164cb9 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 6b9a02f53fb..b3cc32021b8 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 6831a11c6f7..896c53c4c35 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 5545054312e..9a409af62c8 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 1640397aa7f..2afd605560b 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 9902f6b8222..283347755db 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 8722c15a2b8..579ff002cec 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 b1a6065cc75..3ade6b08acd 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 dd5947b0496..ac9079347de 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 a4af9fcb2ac..eb6e81caa4a 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 d843bc2bae3..5a6a1b77a95 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 9c512912686..3420fa07559 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 2b474e3e063..f78e7c474e2 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 91a86ef4cfc..715c92d6e06 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 2b474e3e063..f78e7c474e2 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 83acb231a70..c281c62a33d 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 d40a4555109..b21eef0f2f1 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 25ce58b1a52..273b1c5dd41 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 9850010fd92..26a16c6be8d 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 53c916777b0..da7cce0c124 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 ae53e8859fc..a1ed04a04e5 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 8254cd3aed6..6c06f18027e 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 5755c26e99b..f4310d89baf 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 7004d6695b3..72774d8afaa 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 15276a0d8b3..d68c7868cab 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 c5b5f6fa4eb..b81206df509 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 720199cfb2a..65419836b20 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 07a9decdbab..f5beb3ac7a8 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 2b474e3e063..f78e7c474e2 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 c3a6f3d8a32..354393ba7c7 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 3e5e2f1ee43..c6a1c5c3e27 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 be9baaf5a11..52d7ca887fb 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 24255052568..d1b89bb91e7 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 e824e0ba54c..49841b8e8f4 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 15bb284ced9..e62780237a6 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 8946252620a..b35e5679041 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 75c65cfb7ab..199d7d92d7c 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 7bf8c78d8b3..90e323ec1aa 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 89cac20f5a9..a9cb1938bc8 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 b7708d1c41d..ef9af81fc8a 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 38a130745a9..7e91904817c 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 2b474e3e063..f78e7c474e2 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 e90d539336b..13c8336318b 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 9478fa29e01..ddffeb54e42 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 1d2e3dfb043..a21a12f18a7 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 3c43284f61e..11e42c76503 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 b0b87ba7946..958d127311d 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 503519c0e2d..04b08f83741 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 7004d6695b3..72774d8afaa 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 5513d919089..4c3d4cc3ebf 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 3dd73b17abc..c53eb826800 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 d7d3fc22d70..32e73a78fa1 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 b2f98fbb60d..9d34a7f9376 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 2b474e3e063..f78e7c474e2 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 4beada0babf..c1a2f5f489f 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 7004d6695b3..72774d8afaa 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 51f99b2c27e..03ae15a820f 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 268c0432ab2..fc74b36ee22 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 6f4c72426ec..37e1cd4bd74 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 c0ddf835d5a..eecd7f9d08d 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 2b474e3e063..f78e7c474e2 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 4cda20e0a59..a7ff3f9f924 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 7004d6695b3..72774d8afaa 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 64a49fbb7ea..b4f3b13307f 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 532537a3879..b99a82c248c 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 c5ebcd31841..fe8be8066ec 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 4e0739754a4..974faa798cd 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 2b474e3e063..f78e7c474e2 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 cb23aedeed3..81a87f5effc 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 8722c15a2b8..579ff002cec 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 7a8ea631772..fc4b75d3ff6 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 dd5947b0496..ac9079347de 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 580b0eb6276..118df6c6af9 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 d9be0874373..c566c66eb5a 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 cdddbeee78a..53f68598f1a 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 2b474e3e063..f78e7c474e2 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 19d7cd5103b..414c6ac39bd 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 2b474e3e063..f78e7c474e2 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 0e35784692f..8ba4119aee8 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 7d9334c1505..8def8c550e5 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 61cdc95aba6..9e589cf26bd 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 f727d35bf66..c0105b2a662 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 89b85a83d8e..22bb55c4b9b 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 67a6efa0c0e..67ca9ad12b4 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 9565cfb6bf8..62e8a9937ba 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 2b474e3e063..f78e7c474e2 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 761196a2b3f..120a4240e25 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 0ebc73bd0ae..183925b5645 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 09870f36937..a47753ceb1b 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 7a666c1e53a..2bf8ab26692 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 3aa26e70a5d..556b98166c1 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 0224c78e2f7..95d4572a8d9 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 95278b10cf6..d88eae8e5ad 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 0224c78e2f7..95d4572a8d9 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 c3e38dfbcbb..a49fb546779 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 6b4972a4618..cee6e647202 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 a27b0679751..37b9d9e7bf2 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 3a11f830497..ef2921907ee 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 5bd479382d0..d64a0f9f5d3 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 8b003c58c3b..d0858cc2493 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 3c5060624bd..034e5ff96ca 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 336b50f7c8c..1e8ac0ad998 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 91212c905f9..55afefdd89f 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 e20590b7143..cc97be86612 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 d8a8c8459d5..f5e2a1ad909 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 6ee8859eefb..c02e8cd3918 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 be6f0f13253..b55c597a5ad 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 2b474e3e063..f78e7c474e2 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 8103e3d5782..5ef9587f8b8 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 e20590b7143..cc97be86612 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 c958d1f66c7..7fb50d0854c 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 0463b4a018d..a4316ef620b 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 b6e9612703b..8e0feccadbd 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 2b474e3e063..f78e7c474e2 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 2f020fe77b7..3c3a3148041 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 e20590b7143..cc97be86612 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 ec1c27272b4..dfb74a1439f 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 10dc85cd7c1..71d7a19ee3d 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 f12aca460c8..50288bf4456 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 2b474e3e063..f78e7c474e2 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 1549ec20970..f45c6c1cfc4 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 d37379b99dc..795705c62ed 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 ff9ad168589..38e199d06f6 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 6653b1896d1..d1f200a9f79 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 24f04287984..fe071e2bf18 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 2b474e3e063..f78e7c474e2 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 711b816a064..325dc1d3f8a 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 2a9ee9dca66..e9cbc65129b 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 e3bfcfb77f2..6915155a7fd 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 862e5738b9d..8c139f25b13 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 3cadc5a794f..167306aa505 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 ebf011b8b6c..d8ee189d9f3 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 81df0b01e4a..bcc5d019ff1 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 08ccaacfc71..df53252cac6 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 aad40eb59a7..83fec363b45 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 472fd80915b..92c5e97b2e9 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 4d0a987bcbb..d39854d6ca5 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 77944969fe7..b368cfb0833 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 75674f2ee20..83525972e77 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 a2a53e4d986..e2d75b73b4f 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 5f2046f921b..6c9372f1765 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 80344305e21..5ed1c910a81 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 60fe186eea3..98624dc90c5 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 0eaf7ecc595..6218b2b7b56 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 f6d65c62d37..8a4e26f808f 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 2b474e3e063..f78e7c474e2 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 c03035018bc..fac7388a991 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 0772a2b9bc8..91bf9f612bb 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 9824e15d8e0..ef40f96d0d7 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 c48c590f843..5d92a5b6666 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 fc61da1c7ea..4b26409538a 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 9b851ae09e2..9728eff0c05 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 d765ca20524..42c3cab94f1 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 550928ce2b9..c4d655591ba 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 2b474e3e063..f78e7c474e2 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 678a3a27060..0c368fdbd33 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 f3d446f51f5..60c48633786 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 e10aa7db5c6..ec505e53fb7 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 fdf0646c027..5b03ab63139 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 dfeab519ddf..c44141596f6 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 d4bf7d207e1..3976893c6ac 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 6659b4f7d9a..bb03962b16f 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 13b71533086..812acbd8df5 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 f7d4198cbe7..5f252b5c421 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 e20590b7143..cc97be86612 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 aba97dec3d1..f31dc1f76c7 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 fb0a98cabeb..952fd27d52b 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 223a84cafb7..f988d9b6a1d 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 2b474e3e063..f78e7c474e2 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 c2b0ed72b76..d4b85aeecb5 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 2b474e3e063..f78e7c474e2 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 42d07b7c570..db9c942ca4a 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 2b474e3e063..f78e7c474e2 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 8c6d3e267a6..dd334aa5dd2 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 eef010c1409..4b308ef8c3e 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 77bb5be5d62..7eb02fa29e5 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 c28c687109e..2db0232665e 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 41f7cb8666d..c0225938ba1 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 9d81684613e..fa3087a5648 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 84916db5c8d..9ec9aef8116 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 9267a3c3efa..83e04f84eb2 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 8722c15a2b8..579ff002cec 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 099e75438a7..384c856ebea 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 2b474e3e063..f78e7c474e2 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 da3d4b93a8e..09ce39012a7 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 8722c15a2b8..579ff002cec 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 ff05abf073a..09c4e537389 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 2b474e3e063..f78e7c474e2 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 2e02263e141..da9511a4e66 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 97248e8a019..5760d951469 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 7b1e105823d..0b6f521b3d5 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 7d55c70b7ae..e300cfafe3a 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 a701d114d24..3bb24ad3627 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 bd0472960e3..d6814bad752 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 63058ebe062..a87e23a2517 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 b6e389c866b..fc39eceeb47 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 b017ce51e67..79971a9d16b 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 2b474e3e063..f78e7c474e2 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 99d15aa1adb..983c3b4ac07 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 27dfc9e52fb..5e1805d8fa8 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 82337cb2db0..cc52e9ad1b7 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 e20590b7143..cc97be86612 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 e4bbb61a590..c6b961f70df 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 792d45da523..4d3b4a38629 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 0e202a829fb..60b6d705c55 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 2b474e3e063..f78e7c474e2 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 8758ccea9fa..d694b40cb84 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 61ee5f1d402..174389e645e 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 61e6334eef3..8457f173a11 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 cec9642abeb..a35b3a0044a 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 a8304d126cc..40a1c45f40a 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 f667d43b067..bbb91c4b231 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 ea91782124c..f2d662e1ec5 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 d0dcb16b33a..34b7a5731fa 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 a9b1a52f27d..4b30cb76569 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 122825fb055..72d7a592146 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 b6afc15d1c3..6c0fc639b9b 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 2b474e3e063..f78e7c474e2 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 43406e96f30..8fa8535e5a9 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 27dfc9e52fb..5e1805d8fa8 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 0b2e3b6a186..729b03d929b 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 e20590b7143..cc97be86612 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 9214f96fc0f..2cdc5f2636f 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 91e8d618f6e..b0f16ab7cbc 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 61d3ae54009..f998156f9d0 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 2b474e3e063..f78e7c474e2 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 abd968c6cef..0770d04f905 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 8722c15a2b8..579ff002cec 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 a71fe07e08b..6e21c256cc5 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 7f472afeb9b..dd82665ec53 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 66bbaa0e232..91df8ca73a5 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 6eea4b083db..75c6048ac97 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 405e49af4ad..9302fa59aac 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 6e519996c6d..e0a246c6273 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 5dc68dd8e2a..2c3dea17983 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 2b989c8eee0..dec630cd5d6 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 258d1201fb2..b0cb397a1ee 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 dd100565b66..23208c9a4e7 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 a353059e419..986eebb5300 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 2b474e3e063..f78e7c474e2 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 4dbd06c8e33..09a228ffa58 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 2b474e3e063..f78e7c474e2 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 f06c6ce659c..9eff5011886 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 9f8ac2640cb..4e5d01c99ba 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 01e91301afb..c3e02f97cf7 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 9f9e0d31db6..066af3ae391 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 2b474e3e063..f78e7c474e2 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 94abdc6fad0..0360582b229 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 546ebd48cfe..e3a92231110 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 a4d04fd60b3..4429412155f 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 d83a32f20ac..41b60bdd236 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 244ff4aece1..21f924a71f7 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 0dfcced2195..3c0719e4a74 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 61d7d275fba..64ecdb08125 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 72583c9471f..2c84acd9702 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 1bb9d7fd84f..c4287014936 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 2b474e3e063..f78e7c474e2 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 502fe432bc8..9a51ee0468d 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 2b474e3e063..f78e7c474e2 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 34d067b55ff..beddf6feb9b 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 be51e67f10d..fe898fb7d7e 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 a7734e691f7..c4b05b2f2fd 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 8a63e71700d..5dc8332cf0d 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 d1c1d9b4aff..d5357a23cb2 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 2b474e3e063..f78e7c474e2 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 b9fb526bee9..bc31271d8aa 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 de720a3b81a..f9203803730 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 bc10f646bd8..e4e010f8b5a 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 26b939ac119..9ccf3597cb3 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 2b474e3e063..f78e7c474e2 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 25c367c4d3c..395937f23c8 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 8f8eb55b571..b0327a6d1b5 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 60a4663ad00..32a0847cc26 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 6c40ce1c2f9..9ae5413a13f 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 be664349849..93d2768ab59 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 4c164136fa1..3491e7b9eef 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 226227c4fa8..1bf2feec658 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 3616b9bf6f5..e9bb02bdb3a 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 3044fc2fcc7..616449dddf1 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 f3dd1eb2974..72b9d51b833 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 3d44a1a65ad..8e444eabf7d 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 9308720d14c..455c1b025db 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 543761a304e..af856a0b7ad 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 b2f8099aa1f..e9ffac23a38 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 2b474e3e063..f78e7c474e2 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 4550c310d94..55b8cce5da9 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 2b474e3e063..f78e7c474e2 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 a7c09043261..f34f1603211 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 f1897fb0aa7..f9d889ecb9b 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 dc0ff92db98..125717938de 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 b20e34c67a0..b4b99ff3066 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 d845e067897..04ec99800e6 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 e20590b7143..cc97be86612 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 34e6f9d5e3d..eaef301773e 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 1d1fb7c597c..f0e3b0d64a5 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 d4f420caf94..9b0a50d975f 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 2b474e3e063..f78e7c474e2 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 a15f2dfb700..7bf2c4f641f 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 ae964f0b65f..473168fdb50 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 bc65de46a85..f578a4591b0 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 a1ee91470a3..ce883aa12fc 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 ae964f0b65f..473168fdb50 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 3de2a9e417e..72144b4f86c 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 486e02e29c5..c7f48d3db91 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 47dbd27a854..4782838bc44 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 7a2abacc6c9..12b13280c94 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 6e011a401d4..09fe9c03380 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 961f07cac04..e48c75f43aa 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 db24a5c7661..882d802c43e 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 48507d5d806..832bda9b28f 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 3005090f810..8924aba8324 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 36d86b9fda5..51243b9c88f 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 3b34ae5f6dc..462fbd164dc 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 f1f3adf6132..c75f78f15ba 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 6e931a0181e..05af73f8e42 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 2b474e3e063..f78e7c474e2 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 a3dd6d32e38..f984efcc44b 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 2b474e3e063..f78e7c474e2 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 dc518d92cbe..c2344637a12 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 27dfc9e52fb..5e1805d8fa8 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 d987d717ba6..065ff41311b 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 e20590b7143..cc97be86612 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 8515f8dbefb..4d0fbae0fba 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 04e9d2fa7b0..9de78cf6d65 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 3483e9e4a68..a50332b6679 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 2b474e3e063..f78e7c474e2 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 a98fdfd8b26..25ca6b36c91 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 8481520e3c9..ff536ec8b25 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 19904e58459..22995f51f91 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 bf7ebcf385c..2eeaa7d795c 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 e20590b7143..cc97be86612 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 725d247cb5f..b1fff9657c0 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 f9537736504..1077bffb71b 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 c048363a0c2..59c85838c31 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 2b474e3e063..f78e7c474e2 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 1da64423030..50cf5e0c316 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 b7c57094513..649c038369f 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 28728a3c8d6..4fce6673159 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 b36d3902c3a..7bdd765bd8a 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 5ca5e519e88..1dbedc9dd17 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 382e87019f6..7cc31d4831a 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 d8a228b5bf2..bc6db96e45a 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 0ef210fb5c9..d0a182d68c7 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 e90e05f8f89..401fc17dc5d 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 1d1e05bd353..7c0850f6d76 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 f304c520ea8..e7ea525ba03 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 bc4d38873db..cbbd9da4175 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 480d5806bb7..02eb3f3f99a 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 15420192376..143adba79c4 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 2b474e3e063..f78e7c474e2 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 1f5f52ddbad..97f57c75b70 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 2b474e3e063..f78e7c474e2 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 0f72cb4373b..82b5a12817c 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 f1897fb0aa7..f9d889ecb9b 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 6b7cd89da43..757e816d3b2 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 e1d631261b4..eaaa4c8eb95 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 55baf406f2c..240f09c6476 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 e20590b7143..cc97be86612 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 e21f9eba0d9..a43ab2d3fff 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 1d6a29ee8f4..3d0625a783c 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 537a7994e5f..e18c8d89cea 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 2b474e3e063..f78e7c474e2 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 7df5a819af3..9a650b84750 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 ae964f0b65f..473168fdb50 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 1b24f8856f9..6ec98bd9d4b 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 0b331010650..dc5e22c1047 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 ae964f0b65f..473168fdb50 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 5d0b8a5d0d9..75d3b8580a3 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 95209e17917..731dcd33d22 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 382e87019f6..7cc31d4831a 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 50bc99f0072..b2c84740ecd 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 128be95b353..2b40b75d91a 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 7567b732492..583c8cb9416 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 ac1ea833746..e49cf068497 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 c1277c1ae25..7645e0975e0 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 fafa62d6278..4c13f1357c8 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 4c356905991..b8f947c2491 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 5925e303523..1bcabb498ee 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 2b474e3e063..f78e7c474e2 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 c3e1ef39d09..a176ba9a70a 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 2b474e3e063..f78e7c474e2 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 0de9e4179c9..00b7baa58a0 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 f1897fb0aa7..f9d889ecb9b 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 7751a1ac295..cc61ce60ff2 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 9da07fb17f3..51125c74629 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 59ba236da40..a92a7449491 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 e20590b7143..cc97be86612 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 ab7398f6c39..faec3f39972 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 8f39cd0d149..0964219b3f7 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 6194cbbed48..88c9a13392b 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 2b474e3e063..f78e7c474e2 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 600b1baf026..bc7b891e74e 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 ae964f0b65f..473168fdb50 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 3d1b18e39be..90432971bc2 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 dc542178414..e40700f8246 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 ae964f0b65f..473168fdb50 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 12476e64cfe..a1bc28b0276 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 3202d39ac8c..c182661a91e 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 151ee1c144e..70041375deb 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 3daa2b17ed5..82a6dcb8294 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 9b261c703f7..991cad4d3fe 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 84dd7fdc416..f0675a16d69 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 345973ad4c0..f65e5de59bc 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 9659fbba199..34390e91022 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 b7f020b8949..5b6158161f3 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 a7fabdd410a..be07820c836 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 9377ded88d1..4eb40e5ecce 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 243984489ea..131acf89087 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 b7c165da06c..87117f1fc64 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 2b474e3e063..f78e7c474e2 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 49fddb0c4c5..cba81b5339f 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 2b474e3e063..f78e7c474e2 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 c491f7f013e..d1ccc1dc57c 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 8481520e3c9..ff536ec8b25 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 06c915818d1..9e24f2af70a 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 2e04595e353..a75a97a14d3 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 e20590b7143..cc97be86612 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 aeca1b6fced..562455b2347 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 d6a4a14943d..14b2cd5ce4b 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 2f432c735b5..6633f0b6983 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 2b474e3e063..f78e7c474e2 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 6ecbf0502cd..94fbdd88f79 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 ae964f0b65f..473168fdb50 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 7c75bf66ca0..c451d920412 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 d72808f27ea..be99b3578e6 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 ae964f0b65f..473168fdb50 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 188144c355f..49d7717b370 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 03f459b9dc7..e05833c4175 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 a32d23f4388..b1056d2ce46 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 ebfd9bfa66a..e9b2e0e231a 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 3918b3de3cf..b4bb7c5f00c 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 7c149aebb30..96e6acfb207 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 1ea2f18c47b..b1fedf3890f 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 df69d1b826d..be3f53ca72b 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 bdfc7067fd6..b7b3e4a3e6e 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 0147e4aeff9..e5338b6d193 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 411bc39f1ec..3bc114cd33a 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 adc562b607f..66e6cb49bc1 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 2b474e3e063..f78e7c474e2 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 a64e1f6a3cc..c7626229e3a 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 2b474e3e063..f78e7c474e2 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 36f64875e88..27bf8ee7645 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 27dfc9e52fb..5e1805d8fa8 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 cbacaa4732e..1dc0222a403 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 e20590b7143..cc97be86612 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 b5237c2f9ef..c96f93f5f3a 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 aac9f8bafb2..a0576340971 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 ee796ffbb09..2ab7c0e8ea4 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 2b474e3e063..f78e7c474e2 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 0914990dcba..e99ca34649f 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 dfd34067137..17b6d670bc4 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 7d820a8fcd2..da809e5257e 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 dfd34067137..17b6d670bc4 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 0722a0f7b1a..c1ab56efee2 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 a32d23f4388..b1056d2ce46 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 2d34eb4c16a..9ce56826616 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 56376844a03..94ac63ee81f 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 9468d3e87d0..d4376ad3c5a 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 53702c28166..73510808829 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 089412374da..5a024e693b1 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 21df8b5b8c5..04d4224c82d 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 20424942566..d09da877594 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 76e95486447..b0bc2f27bf9 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 789952d317c..8e6a4d2491c 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 2b474e3e063..f78e7c474e2 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 8fda3dd0c0c..71e93585ced 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 2b474e3e063..f78e7c474e2 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 bc6e44c4da0..d9418a0cab5 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 27dfc9e52fb..5e1805d8fa8 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 684ef30a369..6e898613dd6 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 e20590b7143..cc97be86612 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 903e0b3c9b8..fd9f0f59ee9 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 1c215a3bf2b..4cde5303c2b 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 812ba8dfe0a..ac2d250f4f7 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 2b474e3e063..f78e7c474e2 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 0e046a0e6d4..4f3da8c64ae 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 dfd34067137..17b6d670bc4 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 14f82d5fa06..e3b02201264 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 dfd34067137..17b6d670bc4 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 4712c12b0d6..64432c2e0af 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 382e87019f6..7cc31d4831a 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 9298560b418..27e536aaa18 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 2383375ac09..d8a20dc6f7a 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 d62c4ea2d50..046d73af3b2 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 048167b8902..4675ec9e70e 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 df8415c49eb..f1d3e6ef0ca 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 444327ede9f..45d7bf59a6e 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 d120f4de43e..a13166be150 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 2cbe5169a3d..c888758e955 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 2b474e3e063..f78e7c474e2 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 2e9f6fdbdf9..5769372619a 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 2b474e3e063..f78e7c474e2 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 94a44b838f9..87ea5a40d5c 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 f1897fb0aa7..f9d889ecb9b 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 1dea820c837..7fbd8297081 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 9c29c769c99..f682db93c7b 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 2484f5e5a50..99b1e4b6c07 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 e20590b7143..cc97be86612 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 759310f638f..e502a66b50f 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 61eeba82553..1a45f6ec3a2 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 e62ca01ff1b..c14802c1384 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 2b474e3e063..f78e7c474e2 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 41fce0c7023..dff6099eb7a 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 ae964f0b65f..473168fdb50 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 65c47bd19c8..47625d35fc2 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 33b7ae9a0b7..3fa4051256f 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 ae964f0b65f..473168fdb50 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 c92b7503448..d8bebcfd6ea 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 8330c2f1d8e..54166ca9b1a 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 382e87019f6..7cc31d4831a 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 8785f555d42..41101456dc5 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 a2519c9a458..af0a4ba3db0 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 35a581a8e45..5c6fb68f3f8 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 8fa0d4b2c69..4690a6e0dce 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 3633cbd509c..247bf2c9c45 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 1446c900980..792f8f52dd6 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 94dabaa4a25..48a2b7f5538 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 41ad0befffc..d7f0f8ea1d7 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 2b474e3e063..f78e7c474e2 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 2bb67d5d532..ab1f6d9001d 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 2b474e3e063..f78e7c474e2 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 c8ef040bdc5..1fcfd694dd2 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 8481520e3c9..ff536ec8b25 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 0d80f886c76..1eafb5e5f3f 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 7d11a59689f..af3f77e3be7 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 e20590b7143..cc97be86612 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 cac486d95db..71707fc6ad4 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 4cf6020fc0f..a648c61fb51 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 313c0a1fa8c..a2408022caa 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 2b474e3e063..f78e7c474e2 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 2334e829c09..23d6009f474 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 ae964f0b65f..473168fdb50 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 f8b22058a9d..ccf11e78dde 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 b37d165bd01..dfb2aff48e5 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 ae964f0b65f..473168fdb50 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 005c8a9e079..e85bac6d1d6 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 b05e65f33d7..cbaf6dabf7e 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 382e87019f6..7cc31d4831a 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 28e0674fdb6..be9142b1aeb 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 fcb0392a7c1..9cb2a5ef92d 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 2ec059f0f0b..cb8b4e3a050 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 5b78c98321a..838f2702663 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 f556045466f..84277aaf91c 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 bbc9dd202c3..3b3cc42dd8b 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 585ec66e3de..165171dcdf8 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 df78faca870..4337b84db88 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 2b474e3e063..f78e7c474e2 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 2a719994369..c826ecf9139 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 2b474e3e063..f78e7c474e2 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 29bc39f98be..7c755dfc3d3 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 f1897fb0aa7..f9d889ecb9b 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 67c324202e0..ccfa6b305aa 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 e1e91ba222f..8d5366019b1 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 9ff74b103ab..805d87a63e7 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 e20590b7143..cc97be86612 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 9d22fc1a4e1..9c8e4ac3da5 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 48b94ce5fd9..9cb80bbf74e 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 b6233e1f9f6..785de4deb00 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 2b474e3e063..f78e7c474e2 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 ae836aa723b..42e874f1a7e 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 ae964f0b65f..473168fdb50 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 17f622a0913..de0de9fd033 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 d6207f10d58..77a97c58c21 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 ae964f0b65f..473168fdb50 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 3e20eea5db1..6ac1164f493 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 f2fdfda870d..65ac1aa408c 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 382e87019f6..7cc31d4831a 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 00ac960324f..5358e7185c5 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 71ceaf3c505..a067200785b 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 c64fe4eee6c..70dfe67fdf6 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 a8f50cb5123..5261cb7e97b 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 ea416db8aa6..bb41f6ccadd 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 6f12b626be9..f59263fd69e 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 b4c9e896d55..c259959f6b4 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 5546e8c40be..390721561ab 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 2b474e3e063..f78e7c474e2 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 30b26aa4bae..a319ebaa222 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 2b474e3e063..f78e7c474e2 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 6880a3857b7..add3807d7d6 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 f1897fb0aa7..f9d889ecb9b 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 f0a2344cf5f..2034fa9d4c5 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 b5face9cc49..04313f7453e 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 28c73d58e87..8df580401f5 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 e20590b7143..cc97be86612 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 5a07c4f1726..e699522d1a5 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 20545634ca8..b145692008d 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 1dfe75b4246..cead4843897 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 2b474e3e063..f78e7c474e2 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 3771ba64a78..ba138606ccc 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 ae964f0b65f..473168fdb50 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 26bb1a9435c..17d39b56977 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 afb97493ebc..a00973f6d65 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 ae964f0b65f..473168fdb50 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 bef9394b204..d9fefd78226 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 1c452ced1d0..ff517009987 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 fc09843582f..a047d250122 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 fbfdc261a55..84d1b1e4d5d 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 c9a7ffe2662..552384e7ed7 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 6730d8e3b2f..878607c2e57 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 ba249acc8c5..de8daa4fe46 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 741c7de383f..319bf96b871 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 391699e3e3c..4d80d30361f 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 c97ab999fe8..697fe82e3db 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 70ba03e6c21..fb47258d54d 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 fa2cdec08b3..3f149bf98a2 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 9d82b980af0..d2dd753a05b 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 2b474e3e063..f78e7c474e2 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 32c53ae9b31..326e2046989 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 2b474e3e063..f78e7c474e2 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 42cdd4ebc54..2241fc8db09 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 8481520e3c9..ff536ec8b25 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 ecef7af8e6a..d936dff7054 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 a6263ebb07a..4d06ada09e0 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 e20590b7143..cc97be86612 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 f2de99543b4..80ab432f4da 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 7cd0145ad2f..b3d85a24b95 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 4d797f78762..fa7121171de 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 2b474e3e063..f78e7c474e2 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 c1c9028036e..4f181555310 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 dfd34067137..17b6d670bc4 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 0d8d5e39b4e..40aa001a265 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 dfd34067137..17b6d670bc4 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 b86833b9c09..45e037937b1 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 09773e9fa9a..76d37539327 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 86e15098f2a..6c74fce4800 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 8b643599ea8..b1460d4fe93 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 f8e894a8ae7..74f6e83510e 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 c1093659289..5cd8ff2585e 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 d42b300a241..27c5f879f74 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 8eaeb8062c8..a8324bb0768 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 c9eaaf8e934..47798f3c9fe 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 e20590b7143..cc97be86612 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 0f597fb9c90..0de6bfe3136 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 25a8b253f13..e67dccb19b7 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 6c24e5e24dc..bfecb9cf62d 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 2b474e3e063..f78e7c474e2 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 8c95f54bacc..eda20383b35 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 2b474e3e063..f78e7c474e2 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 3d4540b1d13..d7c5e8c6620 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 2b474e3e063..f78e7c474e2 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 fd884b55564..574fd6dddee 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 07004d8c8aa..d32b10600fd 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 31cf6f6bad0..292908ce58a 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 1cd3581b97f..9f4c86abfbe 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 4a803225926..f77c946265f 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 7c343bbba98..2c26992be97 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 9baa8cd8da5..2df13f024a4 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 8c49c93c22a..cd54b8e32e3 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 dfb0670a2f0..aa9791b96eb 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 cd4a949f20f..97c894f2392 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 ee2526e662a..f52d76f6c0a 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 1321419a24c..cc16515ca51 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 2b474e3e063..f78e7c474e2 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 a28575d99db..1abc3c2ef51 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 2b474e3e063..f78e7c474e2 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 af15a8c9fe0..5a26c5c5c7d 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 ce0279c5444..700941a53ec 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 f267810f51f..d6924eac3d1 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 c116e5d9615..275656f99ad 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 802761107d8..20b5328f752 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 e20590b7143..cc97be86612 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 5bcfe54bb78..d8c5fcaacba 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 28d48b5b733..ecf9fab6c97 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 98b6c074b97..7788580f3ed 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 2b474e3e063..f78e7c474e2 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 d03f4499dc3..3efc48c81f4 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 934476fba3f..b6f108258f9 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 435be9c932a..53b4b0bace8 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 f07540cf592..7cdbece3908 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 c245fe36b99..1f2265e3725 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 d8fb5dcc8a7..b01f16737ee 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 91e7ff62ee1..4018eebce12 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 29e5ac30ae5..d5349e7ba7b 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 38f7bcbdc5c..4c428dc7a6f 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 e20590b7143..cc97be86612 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 be029b14e8a..67e497802a1 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 89bdc997b58..2ed57b5e501 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 5d7455b4bca..80007338026 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 2b474e3e063..f78e7c474e2 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 45fc210c2dd..0e7870f636e 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 40e571c2c87..3b1133f0ee7 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 3a0122ad5de..0e8bfebf51d 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 faf7eccca32..34a4baa5b03 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 21a4dc7262a..8b51f141404 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 c01cb585258..a27203b57fc 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 158db85158d..e21038e01c9 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 c01cb585258..a27203b57fc 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 68ff9fd518c..95ef8d712b3 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 c01cb585258..a27203b57fc 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 17efc1ae04a..caaa9148a3f 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 2b474e3e063..f78e7c474e2 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 59a9809f1a9..cd489793c06 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 2b474e3e063..f78e7c474e2 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 b79a937969a..6227502b580 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 21b4bd6230e..cc43fc1ce90 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 812f9dda455..89b7ee095af 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 7b3274e955e..48569689b00 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 6ba73d3b9ff..ad9954c6554 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 5ef832aa688..566eadc6c57 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 150d30abb7f..f131b201ae9 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 f42337b2e04..a740f96fe7b 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 bc3fbf02cd3..7679bc70a10 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 c081a9b2ddc..1c6ff75a5ec 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 cc5c3ce58db..9ed00c74ab4 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 6483287201f..082b05ac244 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 bc3fbf02cd3..7679bc70a10 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 92353609339..5d5cac6c140 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 3ea8afe3f0a..eb0c5a7d985 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 8f0e41c9395..eda674aa05c 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 2b474e3e063..f78e7c474e2 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 5a72bf219d6..64952e00fec 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 2b474e3e063..f78e7c474e2 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 c458e0e5a4b..760e6ecbcb3 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 3e1752e4e63..8d5d9442951 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 25cbbdb69c5..2d05c56fd64 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 302184f1d32..69a2959a6e7 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 2d6af94a578..0f7c35daf39 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 064f6b74b97..001fa8a7790 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 cf89025eb15..b4a6380258b 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 835637951d6..6f6247aedf1 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 8cdf60c0be4..3875de30c0e 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 19fb073608e..b978ce365f4 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 8f1c320912a..d4f4dbe2af0 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 9e1aabaa353..eb12a8fd025 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 b892e7bdec8..89f3712f060 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 2b474e3e063..f78e7c474e2 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 ca452284ed0..ebc500bc3cb 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 2b474e3e063..f78e7c474e2 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 ff4b1beca02..9ccb0d2d3ed 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 a8a98bb5ff6..b175232abec 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 14184370a38..ef487678b4c 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 10d261ee159..1e4a857d575 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 33e35a2cb60..a42b6090ad5 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 a5f40d53878..dd36039ea6f 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 e20590b7143..cc97be86612 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 6c79bda5d44..e9e5d743b52 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 fa3754e45da..05155a046e9 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 98cc61b0050..1668e03842f 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 2b474e3e063..f78e7c474e2 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 77ed3544d4e..12ed8a0ac68 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 1640397aa7f..2afd605560b 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 9695927e46a..701c3bb321f 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 e172bcbf7dd..9e0217028fd 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 5b343e830e7..967c66003db 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 9577b2e5193..6d3919a7e9b 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 422d55b6069..69e345070d9 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 b345e21426e..f9667327620 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 6cc91d17846..680cce6826f 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 a01a203c037..8c2130415b9 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 5af0f9da161..037ecbd559c 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 1650d9e04ae..b782283f685 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 b2bbee1581a..0b2922278aa 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 8722c15a2b8..579ff002cec 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 82009a329ef..ce4395a7601 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 2b474e3e063..f78e7c474e2 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 57c2ce2323d..86322f1eec6 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 2b474e3e063..f78e7c474e2 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 a29afec5011..7c96c1496ab 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 8722c15a2b8..579ff002cec 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 1b5ca38df24..026f57d9bc0 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 dfd34067137..17b6d670bc4 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 ab927292f80..0e91b1bd5b2 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 dfd34067137..17b6d670bc4 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 76449d2b9b8..6ce86abf128 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 505fd03f998..0b8a4b7653f 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 9d6462ccc81..27ec1585556 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 a71748a52c8..5143cf56b44 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 4faf0876afb..53908e79368 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 77b90918410..95ca0e370ed 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 5a47d427594..bd32c8e3e6f 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 d27f9d1e9cb..85bffdea426 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 a0e0eb1f86f..b445e51d666 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 e5b47a34eec..21fad804ac5 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 8912ff3c280..db714351d35 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 3c5778090a1..db5022f2ce5 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 b4547f344de..6f45bb9a04f 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 b7c57094513..649c038369f 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 93661103d0d..967e724e07a 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 956a5b49365..e0d2f09ec9d 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 a42a47589fc..407d1e92251 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 e20590b7143..cc97be86612 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 f07cfd2ff4c..6d56e5c9f5a 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 103def03614..6e5856f1869 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 fb922775750..da13b529ab8 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 2b474e3e063..f78e7c474e2 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 0b90faab5db..9c1004f5ccc 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 2b474e3e063..f78e7c474e2 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 a095ce2b543..6ac7428d5a0 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 2b474e3e063..f78e7c474e2 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 66cfcd0a4dd..964439ae405 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 b7c57094513..649c038369f 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 04d84e18475..e16f0e7f569 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 dbf474bd00d..12eb907e1d8 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 32b05693a21..728ec60b881 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 6f3b73587c9..8ae0fae8378 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 9808c28ce7c..1b1e3a35614 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 452f4439615..60ba79be6cf 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 f2c8d8303c9..f6683927df9 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 3efad61d153..0e5f3bd1d79 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 c73f7d4585a..96e5db13472 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 0cdd764056a..7ed0de51dbe 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 7ecc6cc9121..91add64c4a3 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 36060f46e34..4f7d0555125 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 0cab4c92c87..f85d0f65036 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 48611b7b001..016f015423f 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 8722c15a2b8..579ff002cec 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 28924db8643..750901ac777 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 61fdd95de62..83d0eda7aae 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 1c97357d3ce..7a3305f5555 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 8722c15a2b8..579ff002cec 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 d368f65b950..1d8c0a747c1 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 2b474e3e063..f78e7c474e2 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 81dd9a21e9f..88bc18e9c11 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 61fdd95de62..83d0eda7aae 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 d781c684bd4..26e14c9b8f3 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 8722c15a2b8..579ff002cec 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 476494b42c9..16c9cbbcb18 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 2b474e3e063..f78e7c474e2 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 c4c6cc8d7e0..02f8588ae72 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 61fdd95de62..83d0eda7aae 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 569e78ac5d5..c414ddad753 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 8722c15a2b8..579ff002cec 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 d0eec46f41e..17d011d505d 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 85e2461f16f..ad2d37f6d68 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 8891cc7c7c9..9abe924f6fb 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 dc3a0b08d8e..c81dcb2a876 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 713620f44ca..cdc39ed552b 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 9e69fb7fa4b..641606b3182 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 3321879cbe8..e05a046607a 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 9f82e47a907..d4d57e6106e 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 ac05f7db4aa..8fd88ec9c3d 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 4a4a6e136d4..dd73453cf38 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 6271631416b..b61d29de6fd 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 b1e82581049..375c16bf3c3 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 35b08e62da6..9d697d76413 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 ab03a272a2e..16374cd9388 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 cfbcebe3736..426e05e9e68 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 10e589d82d0..cc461ca70a3 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 aaf53aaa0d9..8da53e01cd6 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 010ef0d4015..2f679cd7e17 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 6efaef49419..64e8b7d2a01 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 ff3439c0c33..839a6a0fa95 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 94ba1197c38..e388f8a2c76 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 3fde1bf29d8..527ad06330d 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 3995ea7d3e2..5ab9daf251a 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 19c1dc1f044..6fc88e8c472 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 df46712d65d..a7a081f5ba6 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 8125ff84d37..bd62407dcde 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 00345981b1d..fbd84e36fdd 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 8144f93e678..79afbca4422 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 1785d3b0c53..ca4cac21043 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 40a96d167b5..abf429694a5 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 d43f724f6ab..ad4612d6612 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 d689a688cb2..2730a8fe3ec 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 2a1ae751cd9..f68227e071c 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 7cc28024259..0e3edaffd36 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 9e0546ce623..e7fbe51e6c5 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 4e715e83d5b..7ff419f5acf 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 004d4dae08f..93b70459837 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 5e29ff17e8d..cd09d9aa1db 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 6f2ba240a8f..b10746b4286 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 ee7fc6c29f1..06d5baf53ec 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 d92f9337e3a..8ef2eaa6441 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 0b588926f46..8e24f12445e 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 38f6f99da85..79e55377997 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 979fd89e92b..0b543beaac2 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 8c492af138f..92eec06e5a4 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 1c7b6b16a9d..ca6ce91ef98 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 949b7097d15..ddd9c6aac27 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 7774080183d..ec82512081f 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 6de1be4c2e9..0637bcce230 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 de6a4905eb3..1ad1ec36ad8 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 7868cc87727..8684a88ce5e 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 be7cf43733f..f2165018d29 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 2bc3598169b..7d9755b7cfa 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 256d9bdda36..c83842b8089 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 b43ccb96908..43791239f46 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 4d695a2bc58..2eb91573287 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 5336ae1fb97..5efa8605ec1 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 7a6593dae7b..4eb22a161fb 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 6356503fbce..1d8f76848f8 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 b98caa7c4d1..de0dc47d05f 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 f35001f80ab..1e3a01d71dc 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 c7ab18059d1..84e1d7187fb 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 16409dcb986..edbfecc7d69 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 4368af63364..b88c8ddfbbc 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 152121c1866..ca538949b3d 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 9fbb19855f8..c5e393acf11 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 584377e50e0..e038fd998a6 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 a0d9cc1a8ad..fea5145a421 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 e6d801a1dbb..8429b4fbda0 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 606706b9082..f0e4768c7c6 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 237901bd6e0..da0bafe494f 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 47908075b8d..dcf392fbe0a 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 0a0050b93b5..1322c40fb3d 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 b60aa224193..3921bc10803 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 04824c2effa..b9afc09cc96 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 0d27d95c631..ef242da448d 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 867db378262..f3b10b6eb5b 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 8cb8cec131e..ef8a525d0c5 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 702f72613ad..5dace5f5f33 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 8e90cd02721..6b658d4cb8f 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 69cbf698514..90378ba5de9 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 01550e746b2..f7d8ee825d1 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 753980999b9..bb208eecede 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 321a2b976f7..d9b470ab7b2 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 198c60ea601..af1bdb4ad18 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 0dcbe0aafa7..b2bde175f87 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 6235a6e4868..538966ed1e2 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 81e028057cd..33d4d781e20 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 5242235527d..dbd8294b9c3 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 9500b982d5c..909ba4351f0 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 e92f1f374be..55ef66852a9 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 4e7854401f8..d441c66c982 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 08d21a44398..5fd462ad121 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 ef0ae4f75c5..4639089aa47 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 f145bbe6ba7..68736a48fb2 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 a5c39d828ef..c719aec78ca 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 97eaa5fc925..054964d373a 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 27143f915be..d631ad6ea80 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 f4a2749b0ce..9d5c56fab61 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 616a6518341..c2e66236afb 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 bdae787bd4e..1c89aa76bad 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 5910716f5a8..cffb96dbd38 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 cbe89b4db7a..bd3d6f34bff 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 8a35381e27c..fdac13731b2 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 0b960cd3e97..fcef460ae74 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 cd88e2d1657..d74fb6463c0 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 b160636bc39..38e5cfb3015 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 497870cb918..abd80a29991 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 385f6fcc4d4..f06c527613e 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 6824e0998ee..848c38ccd93 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 31f0e4b3174..16f7db3289a 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 fe8489b7851..7494ed39cc7 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 265c623d0be..4f36ffc2f48 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 b0100106eff..dadc694194a 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 a7d8b47251d..de80369a3b2 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 b86c9c4caf6..0fd978d3a18 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 7ac6e1cf2f8..b0bc38fb9e9 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 fadd861c3b6..2bd323456f7 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 7aa8affd49e..8e1dbbcad63 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 00296c11f36..ba958f24055 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 11de3a83576..8f79eff0569 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 63912025466..57c57c593ba 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 c29e53fdbfc..6224632c9b0 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 30187357367..fdedf7ecdf0 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 4c9fafd7f56..ce3f71e0050 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 09da5f1fb95..7d8f179481e 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 9b0d8b4daa3..d818ecb5202 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 1cbbe3811e4..ceb3b49d671 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 2280a4303a0..f50e48d7f39 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 ca53806e225..a2c36452263 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 aa07a1fb207..77c6821743e 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 cde2a362fb0..fbde28473e2 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 83a9cbd6512..7a6cac5d861 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 d7a37be739a..c8b3bd0267b 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 36187a69583..9ff133770ed 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 5787e5d5d26..4cc0d71e8ab 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 f31d64f4cd6..a0b0dc8a465 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 174e8a90675..783e43e89f5 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 aed8610a6d6..7ca4033fd8f 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 2e3ce59d75d..62838bdb731 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 f07bcc848c6..a7a4e71fce8 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 762d79517d8..e05473355c6 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 68ae194f8a1..523d8401518 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 2e5407c7527..cfcd2676f3d 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 81375042949..926ebd0921e 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 931ab66b6a1..1a012369506 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 5c638bc087e..66e1d5e78a0 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 7c2072d34a0..024bfa0e56c 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 868d031cdf2..c83c9163a6f 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 0d2f33e85d4..59ff075bfc6 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 12cc52ef439..f73aa09c972 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 340f71c5858..9965d7e64d3 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 e9925de8e15..eea1519cd65 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 79f4ad008f7..7be59c21c7c 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 b0e7efdd94a..3866b521feb 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 eff09cd6a0a..ea49850d5fe 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 31f085ced77..8dab7f04fe0 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 3b6605bda83..423bdffc158 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 bf7c6824904..a8c4333510b 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 7d5f4612769..04798eace69 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 63a2d1c101b..294000c4500 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 f5aad6348d2..069b597a238 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 4cc0602e6ef..fe598a806c3 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 c040e4fab7e..74c3696f18c 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 9924af17a64..aa9268a3014 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 21dfcee0150..29492a5f8c7 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 521dabdf8bd..1093835064e 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 16b77f3c14c..9f6ca812a91 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 5d3453b0d08..5f2e68309d5 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 8306a787d30..3204413abd9 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 c6ee8b59679..bd6ede58821 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 5b85aada0b1..2a8cc721bf2 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 19364778391..a92a6a6b9dd 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 5c1cd30b77f..a62eff6a53c 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 52bb4c8adaf..f7c8893077b 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 61eeca39f5c..b088e84cbe0 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 e3612555c43..3333aaa2755 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 4502e735407..a6474a97016 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 deecf475f9b..eeec8979dbb 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 e3dc7e34ee9..309a9ed923c 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 487c2f8676e..3dc491e0895 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 ec600f71275..f9f1d9dcb7c 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 c9026f36cfa..0aa6f8f097f 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 8ce9c0474cd..eba5ae4b55a 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 4f35a775033..e7542caff3d 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 007cdf181ff..5c112e19d32 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 bfac3c81ad8..8b8a8e77187 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 91752e8bee5..27e68b8ea33 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 0d87bc22f5f..5156a7a10dc 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 9a5c81fa267..21e9a376d3f 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 c55978c66e3..905b5a1b39c 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 6b9717a78e2..c5a4e0a8120 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 0ed6844d924..3eef0500a91 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 2d7559f05c7..a4d7e912e49 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 7c09323e4e5..c195719de56 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 b5d5150a29f..77be9e1ce9f 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 2e36ec85fc0..21f52d86a32 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 79ee83df1b8..dfd42818cb3 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 aabcbb8c067..7b6159ea6e2 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 487c2f8676e..3dc491e0895 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 e4a3334fd81..4ce5cbfa2a1 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 43615916f51..ceab704af17 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 705f9d73328..624642a5384 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 a35011e40b7..e88fdfac3d6 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 fc9c74a27d6..b6da23b0243 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 15948f678e2..e3e8a6f4ae2 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 375090a768b..1ed7aa673c9 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 60540f1d3b4..98526577f76 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 8e6a922ab1d..1a2f8c1aeae 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 53f7c8a1952..47c5e8dd641 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 55d9947aa79..e91fe3b9c2f 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 f88a26cd391..ba8fd871617 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 d5948682e5d..27b91e54a09 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 c505245de94..a7fd5675dfb 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 fc14ee7d69a..c474f8442cf 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 569ab9e0cf4..4d8278c8bf3 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 c307665152b..0db6de445ff 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 b483266fa94..007eb2c07bd 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 ad27d3ad3e2..64dac54dfaf 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 1e12588a837..f04ebb176d5 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 e2d707f8766..18c1cfaf977 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 983f9a04e58..b29a76f8003 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 e11487a07ef..08a20e7661f 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 c83f577e3a2..a6de9fa4015 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 090b1d827f1..60dcbf80de0 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 f96027b1b0a..a770e7a2b64 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 dc2f56db96f..2a9084886df 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 cb34f49562f..b85b1cdb067 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 cdda04773c4..bfa1f2da8fa 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 e6fc43fb31e..e2b2de832fc 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 4028d48749b..1e90c5afed8 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 8f8e3d4a932..69ad877d807 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 3427fbf601c..e4158aaeb3d 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 00e27c9f3a0..73f8fc6a8cb 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 2d937d74a00..284b79d621f 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 4bccb1831f5..82c13e68eac 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 3d3d12baa6c..8d829a1f656 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 000a617f32e..80f2740ebcc 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 6308c4be1c4..b754a2de3b6 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 4155df55804..4198c92b9b0 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 32805483a4d..a060ecefbfd 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 eca2204e441..9f939330056 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 889051129ca..b94415e9be2 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 7a0fa50653c..29a0eeccefb 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 0dbed4dd7e7..54eb2e2d42d 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 f4fff7ba6a9..495899464c7 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 07b94311911..2ec0b0379c0 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 87e1df93fa2..b3b8b5f118c 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 f89c360ae86..626db5967dd 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 84963a2c1b3..abd0778e606 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 87d8ddd5f2e..f53c0aad9ec 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 309f7eb65c5..32c99f08aad 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 fb311243c7c..52a27b2715a 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 342b57809d5..ec6d45025a7 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 5ed0f77e3a5..1e1818792b3 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 58f08b59ff8..7f1868e4f8d 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 5111f984c48..c2758faa068 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 090299432da..530290f2aa3 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 1590bda8638..b04859f3e3c 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 3ba23e297df..ec22ddb79a9 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 439fa7b0d61..88375dd2020 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 78330ffaef4..f12daae243e 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 54c5c369271..9b58f1e00d1 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 31d071f1e11..0f2d938903d 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 6da60dae8e1..8b82b7e3e75 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 41d65921d4f..17095ed8507 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 892554666c0..20fecd0e8db 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 84c7eb4fb30..9ddf0cbe655 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 664c33c9b03..525753ece90 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 129a7e972a4..dc69a935e5c 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 6f949f131b4..ce59b16ffab 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 a4002dc9122..2fff07d6363 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 fa4e805bb6e..a99c99b7801 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 b73e949eed7..f83136347d7 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 f8b126d9add..73b479c49d4 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 63985843387..07311ee47cb 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 84d9dcfa42a..7985836d1a9 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 8f4306b30d2..e7b5ff844d7 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 3da79dcd039..0994bc67d04 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 7dda5eb2a0a..5f5349da41e 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 d56749cc7c2..fd3f378bdd2 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 112080de23f..ad620f00733 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 62ee4d2b8b3..21648caaa65 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 cede8bd688d..6ba7f6552ca 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 4fe862b5409..2bb7f0ec41c 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 0c86bcb17bf..fa79a0b74f2 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 3b45f4d9c75..6b62d578681 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 55ef267a6d5..9ae8199afdb 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 39fc27b4dbd..cf2d5c933a8 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 dce4b9578c6..53a327740ab 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 cb47c32f1aa..e1a34114cc5 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 f8cc0c516d0..ba7d7ddb2e8 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 ac443b16ea8..c089f2abbdf 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 8c1888f8ccb..c2405674dfc 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 732ea06b732..1cac4103caf 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 d8b1fdf0ecb..ab1d786dd67 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 31788916229..222183e3419 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 67cd6d14d05..4079fea38cb 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 64090824848..e6cc167cb03 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 983f9a04e58..b29a76f8003 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 70f24e2c937..6dfa5d91725 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 86e55813c12..e7dd6c4704e 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 49769a210fd..32eede4946a 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 4633af29b3e..f1adbb1d6b0 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 0e6853f8b20..563f1dcd177 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 ffe55fa9bb7..c277f964179 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 cf9ee8d0f5c..a18c55e3052 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 6975504bf21..7acf6cfebb8 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 197e064242b..bc15ad43f12 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 559090a1dec..59ff89e603f 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 5ce0669f8ee..d9b4c2731bb 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 5d0cef28210..1610a78efe3 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 9d75e335847..e75d7847db2 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 ee5bacc8bb7..9eb8cef88b0 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 18222654924..a9bbe61a709 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 1aae6a91aa5..d5af3ccb3ad 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 c477a242b4b..94a3ff19e0f 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 4e07b004495..4100aaa1b3b 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 46d351d1e57..7cd87698b36 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 983f9a04e58..b29a76f8003 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 ce4585a51da..984cef8f209 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 ae9a20ad462..3507ede5b97 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 6c2e66429c0..ebc79509f14 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 0f51d82f97a..b553f509015 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 393f91e9020..d7319a1706a 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 3d235df56b5..2fdf69c8704 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 38d4fa4ff7b..17c0908f362 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 57f976bbe89..8b0eb70bbc6 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 6d9f231efcf..51449e41df3 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 facbe33f884..4ba3ea340b5 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 01e1d7f83ae..11d1a6b17f2 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 5b097579c22..8ece1f2993f 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 77f09c737b1..aeb86997b7f 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 5792aaa808a..b330fc39a26 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 c18678aa448..cdece5f2574 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 a4119ed532e..700718467df 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 3e2579a8fcd..a9f118c1c83 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 27453650eee..687cfd394ae 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 22afdcb8873..b08adde7512 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 1377e78c8ab..02a44333cfd 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 0ada8567f27..a918c1373a7 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 40f18901236..0f88567e2dc 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 e190f962c46..e42ccc4d0fb 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 db17a413ce1..2d2a6ed8a5e 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 c30d7c95e99..921050e1874 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 c3b3726e05c..3d04f45804e 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 fb0cf799643..69296300b3d 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 e6216c61a94..49801cfeab3 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 533f8bdef77..166dfabd7db 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 9ed95d39bb9..3086786107c 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 e3e6351d2e8..801df425658 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 c46713a0449..d9488107ef3 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 cc51f8f703a..2fa05dc8976 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 91c1088e7ee..5503a9d85f8 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 97b7ca72fc0..1385ccbfebd 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 487c2f8676e..3dc491e0895 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 f810277d926..c02711ad3e7 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 c63bb0d48a5..4b96a2f933d 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 ba04e7afefc..3e33a33fba8 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 ff178c5fa90..a9346f6ae34 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 8af29c51b30..e9645e0731d 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 330525401d1..038e7b42966 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 8a148e4d706..191c905b37a 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 a09eeb4c5a1..fddccd5162a 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 0f689cc8eda..ad5e1e52590 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 72b786c3fe7..f7faeed432e 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 ba5a9ba0c02..911dc89dca0 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 ec63bebdd0c..127723ce940 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 5bf0002fee8..f207148d2e1 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 d35b0b1acb5..a305ba7a77d 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 a35838d2ce5..18150c031d7 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 c9069e7b896..08895df47d7 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 3eef854c20b..978578593a3 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 b29eaf336a1..e33d917f20c 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 3b0aeed383f..9d2a313b832 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 32eba2a5896..3a61d668b6d 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 1f6c9d64b74..93df629a4b0 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 d8f31347bfd..653e5729338 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 e6bb2c9c583..bfe725ff0cc 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 e9ce475812a..5c0406010e2 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 a9f087e5af1..85a4cc95736 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 f2fd78a2866..c2c3965a922 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 a6c0eed7630..47382823127 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 d2dc00626dd..2f52a931c92 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 5aeed749d6c..fe1b388616f 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 487c2f8676e..3dc491e0895 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 79644aa5a3b..8fcb6e62c72 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 0ab662025c5..32dbda14586 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 1ee78b440ee..1a04daff360 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 878d83e8aaa..deceacedf7e 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 bed0d04aa62..946853af52d 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 c1c2a7b7200..137e81c0fdd 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 55c0e4ca682..34c350e8bbf 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 f189ea33d8f..c02efa7a12c 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 4fd24f59923..dffc2824355 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 cc8132d5b01..84fdf6b6a6f 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 7242a00e7ca..036b3af32de 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 313c8201050..46bb531a9ef 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 70da6f7f43a..d8e66e46923 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 64714087a8e..c67e9aa0284 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 dddda71860b..ffd58e5487d 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 f3aa16e9012..2b33e66f871 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 80b816dfedd..e389c113a13 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 1fb08a92ef7..3812bec5abc 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 3b0aeed383f..9d2a313b832 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 2ee11271c7b..f602f07f3d4 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 9609db7487c..d7540139894 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 d8f31347bfd..653e5729338 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 59219f90afd..2cabdb7a8da 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 283e9efabf0..8d48b041553 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 a9f087e5af1..85a4cc95736 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 1e969db592d..0974b8f2ce7 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 bb1ecd886ba..75779f181df 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 ac72c72f35a..fe27b839746 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 3b77a8652a3..2dfd179c7f7 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 4a2ed8cdc86..a5698cdc7ba 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 6c574521f68..2689fd701d6 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 4c60f92e9e1..809ac6cb618 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 dc98f72ce30..de7e68be4e2 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 f8e222eb888..a98ab54e13b 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 a6fc8c5471d..91df0d6f7ac 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 42f3c3ebf65..ab782f0119a 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 19a99d888bd..1c760e28be0 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 0ebd4ff86d9..a9e73109b34 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 d03039152d0..5b8cbcd703f 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 61ab77b50fa..3eb7673aeb3 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 5417df6d081..1c59f192f16 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 6c84093fe7b..e7c5a079045 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 3563b949283..8119155759a 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 e987517b6ae..1383cb03208 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 8cb70c81d55..5c87915e071 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 eac54224efd..df7ac231d1a 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 c92b47e03ff..d67d6729093 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 e5bbec8ae4d..d8c4c16b6bf 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 9cfc41ee2a0..4618b418f54 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 abeff2fb5d0..d1a6765eb4e 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 4aeeea25074..f7a5e9f35e8 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 d1e8d56263c..24f88f2b107 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 1917d722cfc..3ee54bb6780 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 3dadedfcc25..66613797e7c 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 19991e14ad3..25d632d3687 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 9d7d7156692..6372e2658c5 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 1b95b540ee4..dd25a4861c1 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 ff6a794c8d1..35c45da040e 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 0f198b5d5dc..b70eef99798 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 e13db2b1aa4..41819c64769 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 630e892ce56..6b4f087a748 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 3d4c9092462..95d2be9383b 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 72b02b34bc2..c0cd1339828 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 b086f454ee2..b090827c01d 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 db2f43243e3..3b1e3d82665 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 ecbfacf22c9..cdfa1e4f8d3 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 78bd2754bbe..df918bbcc1f 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 206be95acbe..93f1618f784 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 b249b5e9f95..58f6dcc8354 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 47f4a15c655..684ad2c9393 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 7b3dfcc64ac..262e707dda1 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 84b34b54c37..6e5291fb2cc 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 456f8d51525..2e2e75a822d 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 4b0a07f8f60..8dea421c5a0 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 c6ee8b59679..bd6ede58821 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 7bc89113be5..c8a17d7e6d9 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 3482b472125..4430c9ed5f9 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 f7b09cd5a97..400830f8f96 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 be26dbaec67..44bbdf321b4 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 59ec3897a41..6fdb5d30c58 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 0b482d46f68..b249c4d419f 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 f529b520e5e..2135f2d9d2f 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 d01f5a9e7f7..3d150f6a6fd 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 6f3150022e1..2c37144427c 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 487c2f8676e..3dc491e0895 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 241cb12e50f..d36d11c9b60 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 3ce150eece8..662afe6e57c 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 1e7415e4c80..a2304cee754 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 bf5b1d3d3e4..81697ff9556 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 e5019fd042d..ec5ccbeb043 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 a06da6ecc12..3a541258427 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 d3d20155449..ece955fcfa7 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 b410217dffe..b21946f43fe 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 c9a57903e8a..54172a1d5cf 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 22553161cfa..8c45e8aab90 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 4f686c36ced..8d60b1ede35 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 e8d0156091e..95772cdcbd3 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 cb42bdd3729..bfd0e92b63f 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 bb8bee4bf5a..abf17285a23 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 431e17d43f6..e292b0a7220 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 387d8294cc7..dbd23422acb 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 e7bfbb1d06e..b050f41659e 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 5e3f309dd70..6d437700fc7 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 ad27d3ad3e2..64dac54dfaf 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 a164b0cd7fb..a99a4edee13 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 4c1da1d4ee8..19bb2e2afce 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 983f9a04e58..b29a76f8003 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 e595ec6de3d..ab439dd9ff7 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 f35d9adec1e..ac7288cc5b6 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 c8d6f9c244d..d261adb163f 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 1ae18a336a4..6bb5a57d79e 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 98ca85b38c2..d1ac0b9bed2 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 9f07619ab0f..b0d0cb7f655 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 e203d377b4b..d39e9324feb 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 dd6c6623a34..5a059a32d07 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 95ae34c2a61..f1750832821 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 8fa50057372..339b1c7bb8c 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 c3f9dd80560..4ac27e4691a 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 7e6a6fdc50b..8deca8afb51 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 eebadac8e57..ceb0ec0a303 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 4570b8a08c5..2d13777c528 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 a5744b37a11..103230154ef 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 1ecb1f88f03..840482ab670 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 d8b859d1cf7..aa3e1e78764 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 5e232c63504..73b80323ccf 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 3cd3c946db1..a3a934d64da 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 59db87041c9..99035103674 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 166209cdec9..0c7beed5df4 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 4f2689e7a0c..45be1e78796 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 c49997f833b..a47e85530fa 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 b6441fb1c16..3c33472ea50 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 2d564158f9f..b5993972209 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 be73b8266ca..8d687b27539 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 84963a2c1b3..abd0778e606 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 afb613d1846..677249b20ce 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 e35f8af2f0b..bcd20c571e2 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 72feb719e4b..f86ff3bf67b 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 3131e700df9..b12c4e10ea7 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 ded52c3fb65..c0b2edf41b3 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 8d9fb9a4266..144bd32fef0 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 c97cdff7242..60fca74b3e8 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 9051b2ec174..f7c188d7a47 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 e32cdcd20e4..2f49b9fbe1d 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 23b6275892e..3b49bd5dd2d 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 4421855ec2d..bccc15071d5 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 d184ed26884..bcdc93adf16 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 4137bb9d314..fcffa17ca51 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 9e682482235..b93f6894e02 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 8ff6dec4793..4a6fc5b3166 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 86621a6de93..af06c44c114 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 c39c63dc36e..922e009b642 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 bf44764f43e..dc8996517b6 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 b79ecd5780f..c128609f512 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 d77b8474d39..c158f19588a 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 69a2667ee5d..76a33d8dfb0 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 8a135c77bcf..ce5438c7492 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 5cbf4df6987..6fa63b2aeba 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 8186f736508..829e8ad8128 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 8e641b2ec16..e0e2b5da63f 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 2874c562d7c..50ef4418019 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 8697692f92a..151b0183aeb 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 33481d9611d..f6bb2be6d40 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 4f97a2a13fe..e2f19283a99 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 799e5801f26..6bc52a57459 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 7df86e5dd3a..5c59ab17a17 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 45aa8e21a1e..eddbeeadae2 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 566789ecb80..2fe93c30f57 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 29d09196627..dc5754ee911 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 1cc223e92c7..bd86467b0f6 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 e3e6605e59c..d7be4aade04 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 7f76d9c17d4..70da254e370 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 ffde504681f..b383e7c0ba6 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 a86e3a23037..d67935ab90d 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 262391b05d9..a6a9190c93c 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 d8e8416d879..6d349db8ac0 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 722a577735d..272a636dea2 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 21906e128c2..dcf01b99e5d 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 07c65b980e0..567b772a897 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 b9a34595c61..c798463baa8 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 cc8f2010121..6934e9852b0 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 bfe37aedb5d..2f40495bb26 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 eab91204647..3a2335b48e9 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 a0d8f83c021..1ec862b554d 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 983f9a04e58..b29a76f8003 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 398cbf9410c..ca54f939b65 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 bd87b5330b6..350ff3a509d 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 00ceec2d250..6de419abd5c 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 e21a4ea4ccf..bd4eda4fd20 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 34f7a7e9577..bae312d3d65 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 c5913ebf0cc..1812110a9e6 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 a24c36d9951..fc50f9f5eb7 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 b569936339c..45820042ab4 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 37eceb0c6de..e3b6348d53c 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 559090a1dec..59ff89e603f 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 1de66adfa59..f9e1944138b 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 88b672ee0ac..86f6c4ac12f 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 a2755744fa4..0e590d45bb7 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 f36c42403a1..b396f7ebe0c 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 9957697bea1..3267a0a4101 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 1aae6a91aa5..d5af3ccb3ad 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 35b1b648447..ede9cb079c1 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 78d7b652776..de95d82d50e 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 f724467171d..a0e8ac9e5eb 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 983f9a04e58..b29a76f8003 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 476732bc405..0430723d882 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 c01f60828fe..4d01b41cdbc 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 bf1bbfc51f2..631f5d69a30 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 fceff838794..38545c73834 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 699cc002b62..3d37e5c7462 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 1bf7646dae2..c9d60242c02 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 4c45cd8ce53..334267ca580 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 beec6b2df5e..e29f236c90e 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 4fe7d3c1f39..fda0f924866 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 facbe33f884..4ba3ea340b5 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 ed8298c09ec..9179d88906b 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 8b54dff9907..028cb3e62e6 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 bbb781ad4d6..ba7ce80a4c5 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 b8c79ed0cde..41e57285da2 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 a18d76c246c..1300b08d4ff 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 5f66d2b107f..55574385019 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 3e63f02e42a..5c2d701ac25 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 f04fdbc4427..3e7a5b9d8f3 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 b65b9e33d75..3b56d09c337 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 5faf9e88609..24ed5f0a041 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 0f9b4aa3bdf..40ceb91a8b8 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 055bce41ddd..552127ff8fc 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 e190f962c46..e42ccc4d0fb 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 c18cec305da..71357639297 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 d7a4399481c..6c5dbfc6e7b 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 13d6c696701..45d3e080e79 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 55503a1f1eb..09248a99237 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 9a30372b4bf..fbbd89ed72a 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 78f32cd3789..45a94d9dfca 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 de4649413e5..8fe417a43de 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 a3037c115fb..a03297cdf86 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 84f94775780..5d1914dfda9 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 b19de7f1f8f..aaeb7fb99e0 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 c047af38cbf..3733934446c 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 5527c84bfa0..af03d26d3cc 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 3b0aeed383f..9d2a313b832 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 9e6d8fd6e4e..80503635875 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 2888a5aa14a..260f8d9bdec 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 d8f31347bfd..653e5729338 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 5e0113d377f..3586709d1c1 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 810923ba6a5..ca1fabe42ae 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 a9f087e5af1..85a4cc95736 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 e17e8b3f2ed..0d92d4e0a61 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 a6c0eed7630..47382823127 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 af460997040..9c60afce5b3 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 f0ce0dd9318..70c5e05e21e 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 3b0aeed383f..9d2a313b832 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 ba3837c50cb..51a77186f5a 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 c59a4801131..2333102c540 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 d8f31347bfd..653e5729338 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 358b851a759..57539ef7891 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 27c9d779d6a..981377e9d5e 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 a9f087e5af1..85a4cc95736 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 2bd20d6506b..9fb64dff17e 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 3970b2cf4be..ccfd18ac333 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 ced7c9d994b..209ff299449 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 6cf2567dca0..fed930d6137 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 448f9d16c4d..9a8cd87f3aa 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 c6da0ed67fb..efd7b6234fc 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 5da01e58bae..3e098de22bd 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 ea05c472067..9ac568ec7dd 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 769e12b1450..ef237b82dfe 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 575d4b25621..8ec627d81fa 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 aeb3bc8207a..3993069d03d 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 cdb181ade90..f3e1bb3548e 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 fdac144a497..d86d253ae0d 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 c06659a2040..3eb77d63cbb 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 433ffe3370a..f952e5cb029 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 00962d6e4da..42f10e7e7ca 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 95369933b68..1496fe93572 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 f8c607d2d8d..3ed74d846b2 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 e9f8a69b621..2e10f85a6be 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 ec0c15690ad..6108ee2957b 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 8e0aba4f627..ce650a18d75 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 43533845d87..d8dc42bb4f1 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 906ec00bedd..3f3929f4042 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 a296eb102c6..063dfc9dc17 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 6ea5db74e45..5a95d42e5e0 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 299e26e6a8c..e90286febaa 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 99579d3c70f..d5161687127 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 86103479afb..a87e3fca289 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 7f4be5d641f..eb4a701e6bb 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 50d9f7df33d..d333e46dc4c 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 d593b4646ca..fe0569ced2e 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 1a3d77bb379..a0cec43ab1e 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 feba0852f7c..edfe483c34e 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 4a42d422b3b..6cc5a811a23 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 fdd345f3284..b4ad99bc55b 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 7979c4ccd15..a637a09ba26 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 75ce3bd6df4..0e06e5b2d2a 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 e53fb615428..7b096d54ad2 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 57617f33801..db539f84447 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 a26747dcae8..b97ca0288b8 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 59b6b21ce12..79bb38f85d6 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 aff875521cd..f04a0dd8c8c 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 7143e231714..5c1a616b952 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 a86b3ff00db..d9d210c4413 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 a088c5b4a54..75980ca477e 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 45267966bd8..7869b56b805 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 7b097f7f664..f2a4a00513a 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 bc42bfd8829..d86906a5aca 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 b9b7ab9608c..8e9a8b85f40 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 59f3c6290c2..2ee62e2471b 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 b59d56f52de..a7e3ca8bbed 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 07d52e0b7fe..36efeadb02b 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 acdc6269d89..209864f890a 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 068acc10e9c..1f445d6a4ee 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 90c24a218f6..d7b9da624c1 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 29c7fe221eb..0f612092d42 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 c4f4f664c29..10c83aa168a 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 da6ae123e9d..4463dd52adb 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 3a962fb3841..75e44916c2d 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 322c5add002..86b10c32f86 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 1d8444ca5d2..3dbf9aa753f 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 8b380346da8..cb7039c67fc 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 332c9edb37c..6bd017759e9 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 73be085ef1a..aa1c58f99e2 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 febe9470b01..bb7e82935ae 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 fb103b84f81..93a72661136 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 c6ba2bb6ab4..e9d93bc7dd0 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 bde58022304..21dd820688b 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 479db4fe827..bdf726f5373 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 ae2db237176..236feb20cd1 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 7a3522b1a46..10e453403a2 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 1dfe4781952..ebf16ba9249 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 4c6d2c9b3b0..95a1fa33473 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 590afd1c5b3..7c57faaaa7c 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 c261a0fed67..2f35673e817 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 7130a0c523b..73c0a269f29 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 74923b12372..18909dcd007 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 5313ccb2e11..328a8ec8337 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 5054599dd2f..b0e0a5ab28b 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 8ab218c5867..dc995978a8a 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 1b081a8545d..c5551ee66d2 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 65d2a40025c..949c838dbf9 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 da2e1f2751a..927fc5ec547 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 03a84e4aff1..8974ce31218 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 f8ed1d38926..1f8da4103c1 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 1f7795a2116..2641434d683 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 242d96af5b6..9a8e3b27960 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 87a06231040..3934f91b891 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 c6ee8b59679..bd6ede58821 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 d978c54ef99..3132d696b25 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 b62f55c0350..ed3aa178e03 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 ae3069b690e..fcd592d401e 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 f2bd1e329e5..e1ba89128b0 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 cd10223927b..43b8c6b5d00 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 e63b525983b..3a88f21a4dc 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 4710b01d4b4..16fcebe888f 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 d1837e91694..11a995bb2bd 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 c66ff3938b6..6773cea35ec 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 487c2f8676e..3dc491e0895 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 9f2ca27ec14..ad107d1d6c5 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 5fc4a7d24df..56090842144 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 31ba24191a4..4a8a35c419c 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 1a739873186..117bc353d0e 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 6efa962c15c..83f690e4b53 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 9a852f12ef1..4f726538f7c 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 28bb8404ea3..e0518df96ba 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 1b0189b1b9c..f6009e32007 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 e2ba4588637..1f19353112c 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 173e4fa6791..56933f4886e 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 31fc69bb3e7..5039777d9b1 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 14462534f7c..8c1d6cd7820 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 93b00556544..e612439f074 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 82e49484649..20c2e266eea 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 f196c4496f7..ebaba0a9fdb 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 be3a2984054..d3d7b9bbc22 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 5f4cc3aace1..237321d9b9d 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 06f0d608471..dcfbceee986 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 ad27d3ad3e2..64dac54dfaf 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 c1489caef2e..1539d354f3c 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 9ed226e1618..91d8a098098 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 983f9a04e58..b29a76f8003 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 506ef98a85f..123412293af 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 75b138d1e3f..aca442190db 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 cfd688e509c..a555bb113ea 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 2e642ee86cb..970f223d345 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 4f67a911cb6..9604dadbaa4 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 47263ff0899..ca2c961dc26 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 1faa69bb325..a38a216d3ca 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 17c9f799285..aa4ee656de8 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 1085b2e07fb..797ae1cd79a 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 63a516578b5..d49328faace 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 e762ea592a3..3cd15bda84b 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 6e61d4e57ba..b4563497cdb 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 59cc1848f17..e15653f2f3d 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 4e04fbe3d71..2419a766a0b 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 eccffc530b1..676cc30e1eb 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 c81640f474b..70d0188e67a 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 d5a17b68588..6063cce1646 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 e8bdd773c62..44f9d14437b 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 aef23cd6fd6..f0588d25153 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 bf3aa141cf3..11fd6c2631b 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 7778bf581ee..e296cd48503 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 5435c5acbba..c520cea6d81 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 ee06420559e..41d21a313b5 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 2f1a9d8b140..14fc4efe2db 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 d938bf302e3..87e5f88261d 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 e9bdb89f26d..20900abc1a7 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 35cb47a6592..bbd69b5c168 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 8c321a38bc5..c9c7226fe44 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 28b3692ad75..c9b6a7bffb2 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 7ce8a2dd580..704bb772f1b 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 cc58197458a..3c285adc238 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 a6c0eed7630..47382823127 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 874da7def58..b94d157e744 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 36b10987e46..fc27f262ccb 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 e9bdb89f26d..20900abc1a7 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 dff160f8153..0cc12445215 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 8c321a38bc5..c9c7226fe44 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 eb7066d46b2..aae5377acee 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 3773c7044db..44a45029c9b 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 cfe9f3a2e08..70b7b68c7e5 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 ad4090b7f54..8737b9b8244 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 aa882c38155..a34e9ef640b 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 e6b30c635b0..3f9695fca5e 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 081b023bea2..bfd8a1f0a53 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 9f1f5962fc9..59a7420f7eb 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 bd24046cd3f..47a54f6445b 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 7875b4ca4ac..1093fafeeca 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 cf23bcf8b76..4662862aee4 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 2d674dd6dbe..e8845b4c6d5 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 5642695f7ce..bc017792fee 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 274f5c5873e..c318398b6ee 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 39e7d0b7a4e..10b3a1b5cd9 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 624a95d8435..4106118b26f 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 6f32ec6b9b6..d972a003013 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 2197f6a914d..b00acdf658c 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 7577bd191cd..e8b838c7994 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 899ab2e3f74..1564bbb0cce 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 849481ed804..758cec861b4 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 d683367ef32..4f91fff771b 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 d168f5854b2..703e5da1924 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 f3a6a8ec62e..bc1f533bb63 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 7f168b6aa54..982c2e363f3 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 45a12d0987f..67d33ff86d2 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 2bdf22746b5..5d365c1e623 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 b604b85f904..7ba42494acc 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 c33b7e49e14..db2f28fcd86 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 ae23cc4a5be..5505df7400c 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 7ead8254b35..cb3e42492d3 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 d969109af57..f9493413ebe 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 311dd9633b0..04382b68a81 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 ec62165565b..0cf949a5a2c 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 7588a298c14..ce73afaf90c 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 896c1b93199..9cf9000b878 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 e5edada3214..fa5881a133b 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 0b76dbf853a..925c7410054 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 1668723f088..15fa620c45d 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 3c92f0dc6c9..9a8a5d7b388 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 ba9e64239e6..35c26b4b0e3 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 3d74487d2c5..de331aa8ac4 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 e6ebee31387..a58f7dc8225 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 50443d20b9a..c38e3861b5e 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 142ec652ac7..eea6a8739b8 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 2e34c438253..959e3b1984b 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 8d3a25fd31f..e06da325a5c 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 29e4b848e3d..88bda6d8422 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 3cd653b2a82..54c516b30e0 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 acbd1919bba..7a48e22bbd0 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 affd6a4570e..4abd76771c5 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 d38420a84dd..f9db7759fc9 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 cb084aaa506..2ee2fb61ce5 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 07aaa323c2b..94446eb3057 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 50f6ac57abc..3a63b1b9bf9 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 1fc4bc295d6..6547e7c9a08 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 63a516578b5..d49328faace 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 4a472cba46a..ea7a3f5535c 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 178378059c2..98ede4db8d9 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 5504c36e76f..f4773f7cdd5 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 9b8e5869804..9d13d6fe124 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 ba196f76151..bb7902a03c8 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 ac79bc46a38..4222c27a470 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 2fe71ab30b1..6d6f46e4230 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 bc694e0ddc1..f2c9863caec 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 27ce604d13a..287d4a4357c 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 580977fe24c..99c9a2db877 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 156b95441a6..58fc66e3043 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 1bcb9cffe77..08070abaf5a 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 b8fc33251e9..f3514b46210 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 487c2f8676e..3dc491e0895 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 596d135e398..c76f6c475de 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 04bf818a9b6..f9f405b114a 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 2c0d9897826..7b201c83c44 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 7aeead762b6..ec6d9dd3110 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 68e16a20c74..f257967c549 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 b86eab99aec..153cd0e5134 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 d959626dc78..64dbde945e8 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 45df55b8c7a..e80d27056a7 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 9e6a1257f39..4f3fe3782a4 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 3c22d6fb15f..96e6fa397c7 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 cdfddde3458..2f21c02c93f 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 ed3b1c3778f..8f5e416745b 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 a01c4d85a27..aa4cf54b2f5 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 fc566982a5d..cf5c659e353 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 94dbcf0856f..da55b62539a 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 bcb1fd117b3..0d5fa7dbd19 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 7525538684c..f7e3cddaf8c 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 ea7e93201bf..39918474300 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 07aaa323c2b..94446eb3057 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 e92c67124c6..5754b401612 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 795d7b268c0..fbc5329b30e 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 63a516578b5..d49328faace 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 41f12609ab0..bc29206a05d 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 81615634b62..294f7bf8229 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 ad27d3ad3e2..64dac54dfaf 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 62873f1c2b1..6121149b364 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 0898b7026c5..21dbb5a74d7 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 983f9a04e58..b29a76f8003 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 97477e09d68..cebee28a16d 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 8ed4dc9a9dc..ced978e1719 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 7abca229030..933a292bcf6 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 0e8d2c3263f..b2b77e3bd63 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 bef3eea5947..ce1678acba7 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 dc8ae59a187..be0e7dca2b8 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 19b8710fe11..144291a5a88 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 c785a04e535..9a6c5495c23 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 b2eb97d9f51..5f6afa7fd6a 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 99e75bd2714..c61e0d7012a 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 c34b2bec855..c68688c1904 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 a6c0eed7630..47382823127 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 36e63a006b9..583a34dc150 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 3f569028c9a..d69977988f2 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 93ee44386eb..52df60daab2 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 f81ae659a9a..e8a35e4e259 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 57204e2d74a..ba967ddcbb2 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 f482fd8bba9..f49dbaa616d 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 f0e213d32f0..efb103d9dae 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 545a72f7897..644cc19e078 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 7f6b8166b20..24fad93aab2 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 dbcc47c6320..d81f7bcb920 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 f4a216d0fa8..7ee765300a3 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 e6a2a284354..74391494186 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 7b7b7262922..517ac67e48a 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 aca2607808c..b6266389cdd 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 a52b0e5c341..b29b5e70617 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 fba389c4b72..53ea409f558 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 bb81f48428a..57abe2ce1ce 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 2c8dd15f5da..992c8b9f2cd 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 38ec5d817c2..309825852e4 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 76e9824960f..38e5bd0b03c 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 98e4fb6ae70..386f6c93d36 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 5483d3ce139..d9e3b9889f6 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 6c6a94af667..00dff425235 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 bbc7fdee7e6..f25ed59b500 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 76a5fbf857b..7d258d69878 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 25296ba83a7..4a61ac5e9a5 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 441c5d57720..c36b22c0067 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 eec35ae6081..e7f3e41b4bc 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 bcdb60fee6e..c7dc7969224 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 80138cc9991..7fe96e13b38 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 c49db6d374c..23b2f783673 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 a45d4d90a9e..3bf01f04ff6 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 bc6699a72f2..dec678ce1be 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 81e306b227b..0bbf90cdf7c 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 22e0c0e9341..1ce9726301b 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 da240ceed3e..4154e16a3a9 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 b626a69ac93..484aeca8b55 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 d72408ea60e..fbb522335d6 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 5f955a124b9..0bc0dba886c 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 5d719f1f913..586e05d4545 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 5d27db03f95..eb5d615977d 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 be8b9e6b66f..bc359860f36 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 f15e03c5b1b..5b54e94801d 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 642c06f31ac..4e19da6ddc1 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 9effc861b32..9474a74d507 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 14ea6b75a78..75f77507588 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 1be1defc876..af07a673fb4 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 e1f26d06eb4..8af73805763 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 95fbc675086..f60946d5888 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 7e5daa11000..ea3889cfdcf 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 c93797800e3..be97b8ec3fb 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 caceb51a63a..c105acfa48b 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 4465746c21f..363b012e630 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 90d4ddc7545..f38fea1abb6 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 5ec3f114b05..06301eb3a25 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 c148da6c801..2a8cfb4c6b8 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 fd056931e67..5d649ab964a 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 e5aa719bebf..eb433714bd6 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 b5d2199bd69..a25302dc13b 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 8007dbd5b4f..f4553ff67be 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 7b5db6ec8ac..f23b0a3728a 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 c121272d45d..dd40a4815b9 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 2d3122cfc1e..bbdf540c443 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 d6df4cf8cd2..b6977bcfd6e 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 79108ec8bac..440a9827d65 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 7b6c5fd2678..7b7f7e8e387 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 f15b9cef520..2a43879b8e9 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 2832b1d2897..a106b43028a 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 e6b36727aac..0f9df67d171 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 938ab1547a8..a7c4a4648dd 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 7d2fbca303f..44726524dc6 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 126ecae738c..65690563e42 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 8e09dbd3aa3..af606d78cdd 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 50e4d8ad4c4..03147bf479d 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 8085450d39e..ecde341ec28 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 0d3587c153c..eb77c606238 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 b94d0f8f93d..a301c2ae5ad 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 64ff3879b45..ee3dc24a2f6 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 1e60df9d884..37ff92621b4 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 402d700eff3..a7621564533 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 1a2fa736ea0..0468eae4bc0 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 285ae6dcb9f..0306062b923 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 51db824e771..ac63303c018 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 b1da9a35dc9..3f61207e243 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 92306c27b3f..f7088fe8778 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 1b01919ce71..d05b072e541 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 8b1b1857887..b16a0fff443 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 98c9e26318c..2a0c4953b5d 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 127edaa141f..c276250d1e9 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 3ea79585662..0e562e35dc6 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 41e2de0476e..50f6f6c300b 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 e574efcb3ae..9f4951bd7b0 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 6fe0dc03c96..d70182f3234 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 934224f2a0d..404745ed4f1 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 1a49ad59d83..b881fa9c424 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 bd8be332709..7b82c087666 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 9d50850b59b..a8195816dc9 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 c8675919df1..9ff452cc26e 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 4cc5942654f..5882602e824 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 983f9a04e58..b29a76f8003 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 cf0f227aa39..1370c414e5a 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 68eada53666..1914fe7f720 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 0de8af72295..a1d3a8ddcde 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 e4e8aa733c5..4a40f3217d1 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 cc3022043d3..66a67e40a5e 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 41cec4af04c..75366ddcb03 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 ed3ad9a0d2a..8fbc2489c86 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 f5870c35c32..6352638ae3e 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 6bfafb5029f..cfd3be28c9a 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 559090a1dec..59ff89e603f 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 7d0756cf928..b5e5f991030 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 428a0d524f2..fec51a30a5a 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 5480115316e..efc65227757 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 45f098d8aad..ecdaa750b9d 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 eba33d8c030..563aa426c40 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 ff2ee4cb29f..5a003b67cd8 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 9de2ef7ac56..0b74674fab5 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 e2d8bf052fa..85db7a571ea 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 1042ef0d18d..9add2bba99d 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 983f9a04e58..b29a76f8003 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 39c81ce2c79..2b2d20e5b19 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 ba1331070ac..8ec2c0da4fb 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 7a128d3ed3f..8d9d6138921 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 1a8dc4aaa9d..0f1835e204d 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 d68e16cea50..bb591f14165 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 e164229bd31..c1df971ad7c 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 456c3db7e41..68dff595f82 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 02bd955e893..9ef0f7afc64 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 24f95f0aaec..8c4a84b5967 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 5d27db03f95..eb5d615977d 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 797feb0577a..7f24f48aa5b 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 dbdafa01857..dd3533837ca 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 51d366028a3..8af12aa89e5 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 10a7e7613a6..817c26e1c77 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 7d8cdb5160e..4ccd22d1c55 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 f44c1ae2556..53e089de000 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 f50246bab8e..6d790c51f4f 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 0a72d8e86d1..9fd8ed91acc 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 3159ac99401..33d5f64d386 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 d0b8516dc51..b469da930e8 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 c4bb0d4b547..a24847dd818 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 0643dd54d17..44b44a3527b 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 5f519dbc4e5..9dc6720624c 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 c501d567c01..6b6027fdd3c 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 43fb67c7bd1..dcd06837a60 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 385571f72dc..2ec0223ec60 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 da58807f1f6..d986b2f071f 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 ef1dc872534..90515b8a49d 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 053e432e027..0878c582566 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 de9e4dce747..25223039bce 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 f1409832132..20efc1979e6 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 f23f212fc70..fa17fea6e7d 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 4cf436ffe76..1389fff2641 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 5bad47e1965..8b7990bec18 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 ef9a3223a82..77ae1f2540c 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 730506ae180..29ba5cd59d2 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 b5cc473f8b7..696c41cfdeb 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 24593073603..3674b5db4cd 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 28d9c866a7e..18fee4f1ce7 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 a3b1723f551..18363e4299f 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 a7dffc77ac8..9071967e2f5 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 9805c786590..7c5e0771900 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 3e9b4b2ccc1..3a9b783923b 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 d1ca370403b..241d7ee7131 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 7bf8be44382..2578a9c1c1b 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 3fcbf4b3e81..2febe3553b8 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 70167b9e12b..0840f95c79e 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 89821be4a4f..38658ba0a62 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 8cfdc060686..42a1984ac5b 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 fb16f9feab0..ca58695267f 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 316cc9df946..7feea27bbf7 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 bb58d2cbab4..b60eadefb7b 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 5bf8f68908f..15bab596146 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 6a41eb647f2..5c5e9e87984 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 9131d4fb67a..b3683ef78c1 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 2c9341300a9..31c3a3dfb3f 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 17090c75281..042d65d096e 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 615da496d38..3b39b2753a8 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 9ef98d4f38f..dd29043116b 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 3c87ec2af70..a1942e6b1db 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 e578f01f942..cecdc0e7676 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 27b78432f56..07a9ffa9ba3 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 42b5bf4be49..3f6df436fa3 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 5dd8343f8c8..5feba94bd2a 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 170741e75b9..013118e329f 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 f1a22cb0869..59854b7fb80 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 6f31f8636a4..7b3d29be0c3 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 35b43e57ce9..883a186f630 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 983f9a04e58..b29a76f8003 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 525a291ec1e..350a2b4ce00 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 c5d4421c5d9..cd78da8e005 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 68d145c64fc..2da87e8b629 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 41c9fe63369..083a154a56d 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 61dab179447..712c8870298 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 f503eda879b..086dcee7ac2 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 99140e3bdb4..6764a01b9eb 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 e6623e9a58a..589cf44e99a 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 5a0fb30b486..592a42006d5 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 559090a1dec..59ff89e603f 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 275e262922f..af4e8e29e56 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 49fb95e877e..ef5032237b2 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 1cb60593bdd..a2ac0f9465b 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 41778e1101f..f10db82d973 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 5243b87035a..74017045e13 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 ff2ee4cb29f..5a003b67cd8 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 f8bef608e17..ee2a6645d20 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 ffb2d5c0112..75cd67812bf 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 5fdc11173a3..a2ccd7d3996 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 983f9a04e58..b29a76f8003 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 27dc892115d..83c35c88b5e 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 c798648c92c..27931d728a1 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 2e162044964..0e0161cf7dd 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 4bc9e72813b..964a0f286ff 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 abf8c48cb09..9ac889b7180 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 dee9f02479a..a6532fc2e59 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 7662aa30a34..821c0dd8db9 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 ff18b7ecebb..bd161259310 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 8a04fcf8522..03a6cba05bd 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 983f9a04e58..b29a76f8003 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 20190ce0bc7..71a66663b1c 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 b504547d667..3c6dcfa436b 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 62357f2ebf3..4fbb262d9fb 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 a81eacbaa2b..9e90ad216bc 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 7095055981e..af01160b5a1 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 f980b6392ed..24f3970296c 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 4458271444c..a295f703db4 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 0645ee8f570..54ac660f7d0 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 6d7afe2e753..0d898359a42 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 ad27d3ad3e2..64dac54dfaf 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 7f67ac14d7a..6cade48ea55 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 cc369a17f6d..3c3a354f907 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 983f9a04e58..b29a76f8003 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 d229c688630..129644c4c8e 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 bc59037f1eb..47095939f10 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 24fe20738f9..42774df83f1 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 17477c2fdc5..296eb71b7de 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 3ab7fbae18a..1c22dd86edc 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 967552352df..82436696750 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 74dc63c3168..ff24e3da462 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 74c321bc297..cc874756c49 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 4ac56dd83f2..6dfd978cf37 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 a6c0eed7630..47382823127 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 264c6f4d699..30a737e20e0 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 a668906119d..1663175d098 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 b1f72cd16e9..f988bf1cc8f 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 3bc74402a29..4ec997db3fb 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 472db6a7091..9ee1986e012 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 b696d78d6b7..6460ab7eabb 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 0756b0b1d50..15517663d62 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 2de9dea3e96..334913a5596 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 151d7ddaac3..51645421eb6 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 d1efbb9a160..05afa370015 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 b963fd008fa..a2a100166dd 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 71a69a7a806..422ffdb1cd3 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 42c37ee22f8..eda710f3fe3 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 4318e56413b..3904e1bc49c 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 8896657cd65..e189366a2f1 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 d8c40630c60..092053ad99d 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 1e99bfd0bf8..396e635b009 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 8f59d47dbf0..b2071a40a56 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 a2babf8d61b..5ce37a59545 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 e6c741fffed..2c8b0e8d45f 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 ed22d7d4096..11d238c48ff 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 04273e21ef0..00184da9bbb 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 4711ae2d626..ad3dc00947e 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 72f53c248dc..7c410cbe108 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 7c24c40c358..9f765a961fb 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 b8d8b752db6..24c0028260c 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 afe54f8b3d9..8a7f92e4c01 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 85335eb35f6..004df38e41a 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 9bf200c9c55..1b9f0d3c111 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 1cb088f8a5e..6259fb4ce10 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 9f6ade45f7f..098aed78397 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 ef4bc3d80db..cb0dfd302a6 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 e7e6e91d8c6..560426b2743 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 eaddd60af0c..7e3689c50c4 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 ef83768b617..1b3941a21f8 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 0797dc3752d..a22ff95506a 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 9f6d2144eef..4da6591d290 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 91c6b290ad1..fbfc91c85b3 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 28f58af6e89..4b77264ba65 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 8b89687d23f..b0022eb9742 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 f4afc915d07..1d55e2289b7 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 4fdb25e0dea..ad2d5971ade 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 07a6238f971..c8c098ca18f 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 86808ffde78..3ffe877eea5 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 d7998697a8c..02e3c14392f 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 51d611f024b..43b6031077a 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 1ea1a26f012..fa6d8072a19 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 e8335ee71f0..eb32abe7cd3 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 15d1dd8dee8..6d9714bf6bd 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 16b4b4f12c0..6b3981c3f69 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 76db7f17182..dc0f7ef559a 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 84963a2c1b3..abd0778e606 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 3c9fbd793f8..41072f1b985 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 21c06b7e3eb..29ee343181e 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 be6d033cc60..de34c483011 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 a1ad58a5e86..7bd40788f13 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 11a19c541f5..f05ff57cf09 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 fc52785dbac..a57b23042ad 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 eee3c960c55..648c880bdde 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 4dd0b085bff..418e61240a9 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 c3f49d58021..2a5a18f83c5 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 b620eb0b9d6..8d4af903ece 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 18cb0412eaa..a9b252d8fba 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 c3820715c15..a0c7e108971 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 5c77227b07e..ab4f58c3de5 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 874e38e0ac4..23cee55148c 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 309539996e0..f5f2a4aba15 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 6638ccba734..6230aa5ebae 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 f382c87e5ca..fe626c2bd80 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 04d3bc5b4f1..081d4b2aad2 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 f6395f1b62c..e27472cc6ae 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 35728399939..d7109f7bfeb 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 45ca3fc8759..d04b6e9a3c3 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 311fd67e1ba..18f996da3ce 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 a612c449e62..ffbba54ab78 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 209724d606a..79389781ac9 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 8482fc84e51..1242c47db8e 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 0e4f78c1a82..2e9274b45c8 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 888481e60de..b0538069688 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 c8d6c4344a2..8339617a1af 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 14f303e94b6..a396cd4a854 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 78e8af87391..07dab3b1047 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 836a76caf8c..ec06ae259de 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 9828a93634d..75708407359 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 1ae52f1551b..e3951154567 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 421cc3c7fe2..8a109e2cfb0 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 aea65509928..565ed6794c0 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 318924a28a1..7e93bd9619c 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 f544556654a..8041fa32ebb 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 4be520f8198..b8006656b45 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 3e2fcb31ad3..06feb494962 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 0a317a94900..c5084ed57cf 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 ddefb781542..6526f425dbc 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 38bdf123d80..c99e515394b 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 29b64c1ac36..e29cbf5b2dd 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 156d72b09d6..eda15d9a041 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 38dfbb2c5b0..e2c471ae503 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 1e75127902e..7838fa616d8 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 8431e52e9b9..2013d9a27e9 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 09309a5ac63..8854db1c8ab 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 fad04acf621..a3d23ba1584 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 983f9a04e58..b29a76f8003 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 25ed1bd9e95..6aa487b254a 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 ddd3ae57bd5..f59cf44b406 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 07bd241c3f2..f852286dc61 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 1751424594d..0f05d105f2b 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 fdb57e1f89f..156628f2c20 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 b6c1c895c8e..e14edf51b17 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 721f1e6e0ba..fea118416e0 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 45bce1fd8a8..6ef54c4ca5e 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 6fa5bd94529..421d73f8cc1 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 559090a1dec..59ff89e603f 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 a61712ab781..47e19a0dbf8 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 d105887cc71..650cfd7253b 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 2d666fb1d68..a99d23d64fd 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 94098b0448a..217bee8760e 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 a036c49c85b..9133bcb5089 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 1aae6a91aa5..d5af3ccb3ad 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 69eb73980e2..dc285ad70fd 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 366984329cd..1ddeb2d5c26 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 9efb61a7536..48eae1b2cb2 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 983f9a04e58..b29a76f8003 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 b31e89d5fc9..1b20ebc1bf1 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 04fb50e0d10..3fea539b3f5 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 011a4da4771..83dcd3a9a24 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 818744b2c8d..5565d12da77 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 40c6789a1c5..dd2d9e68128 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 6a2b690957b..fe7c133cdcf 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 699580a4160..c7304993cf6 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 e5eddd36b56..13d9cbf5ab2 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 7a9fd5f71f8..2434678ebc5 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 c6ee8b59679..bd6ede58821 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 7a499893099..ac043d1ccff 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 4616498547e..5a3c15d85cb 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 41377530feb..89b4cdf86bf 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 f8104c13843..bbdd718a5de 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 83da7cdb3c4..0e5af978a68 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 d9d08a0e261..a4f53db4623 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 60c62f076f9..bff515577ac 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 250baa5ebac..b59a309d481 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 8bf1c0d7040..640949397fa 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 487c2f8676e..3dc491e0895 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 ab7144e0197..5c8ec00ec0c 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 43d9bd9a03c..d1d827fdb13 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 baa4bbe2c7f..4274e77c511 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 b34fe451776..5024100e96f 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 2c9a32d0aa4..4c3ec1d31a6 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 3c75a8d0dcb..5c150324f46 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 21f410d1458..741e2deaaa1 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 01073e13571..3d9c7a1eb11 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 a30f27bd5f4..59d29973bf6 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 9df299a3bcd..2a00ae1db03 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 36ad00ae598..684a50fe8bd 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 ed102052e7e..cf057eee86e 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 2d9539318f2..e26148639e9 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 a0f205eba62..dfcd9396da7 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 700d8f8b385..18886ac8ba7 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 c03ef9d1917..bc62531f1fa 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 428fa8413b5..f26aad96976 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 2775bc49b30..4aa1776a5d8 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 ad27d3ad3e2..64dac54dfaf 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 b0adf309066..2125f120604 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 dfb456a15fe..21d65c0c1d9 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 983f9a04e58..b29a76f8003 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 c86bb9862e2..49d1c487f73 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 2becb0c7ea3..be9899197bf 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 11338b6396c..e067221a237 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 2686892d747..fd0b66b69d8 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 ecdb4eaf5d8..022f6cc22d1 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 e67a564072b..91914407dbf 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 1929650daa0..bf005fbcbf4 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 c1f15750c50..e00146db216 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 258a65f2de0..1a9fa78a430 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 711bedd189e..3f0890dec84 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 547bad0e28b..890d8188f2b 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 4df13693bc5..5769a21bb92 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 9771883a888..bdd9dbeae3e 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 a2b9e1ae50c..ca6d32f725b 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 3a3924f1de7..3c82846c390 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 cfa763bed73..25dc82d40c6 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 2cbdfbb624b..5022a4b2082 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 0d9d7dc9198..df13d881b77 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 e9bdb89f26d..20900abc1a7 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 48a15eec4d8..f78a61e6c17 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 049134a716d..ea80a8a0f0d 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 0b98e257f87..71852907f7f 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 a6c0eed7630..47382823127 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 50356730277..ca47c85eb08 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 b3fab49246c..f7914c1ca6f 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 e9bdb89f26d..20900abc1a7 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 059e7cf4fc9..cdff7e0f645 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 049134a716d..ea80a8a0f0d 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 3146f089ada..cd1c04f8918 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 7fe8fbdc42c..6cc11beb49d 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 ebc1688f03e..7329938338e 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 2f4097e7b88..ecf0e8cbb48 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 d5acd98233c..a4d61c97747 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 8ca58b07935..6b98f3557e7 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 e0fb5b49aed..db500293fdd 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 caa9f53299d..5b7588350d5 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 d5fc207ccb8..46c44d0dd54 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 01f865fe1de..18b54f20a1a 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 9b557fae03d..9a5d371a19a 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 0d3c691c0fb..76a2310061d 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 850589f59fb..1186e36f749 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 72cb56cbcae..a490dce3bce 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 a59b0cea057..e2d9e926bd2 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 962b2d24fd0..062d2ec19a9 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 12edaf97e17..d6327ee3cfa 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 90c373d0014..2c3f4d3cd89 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 a5ef2862bfe..025afeac2a6 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 4b9d03020dd..e263fae176a 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 64129d0a7e6..a4bd41540da 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 c7e157f35e0..93edbabf596 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 8516009ff56..1e80529573f 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 4a98688346b..c36e154b084 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 756a3394865..a8172cc2eec 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 ccf3870cb4f..62037e21474 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 7c393b055dd..21c5f468003 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 50210d93eb1..8b760191006 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 e62758e0249..719cba89ffd 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 83646e83031..663c1a4b5b0 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 bd72135c233..d2d1094ab24 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 6801b5302be..f0228e5955e 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 49c67ef10f6..4594a851a11 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 2b825a6ed12..d3d4ae393f9 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 5db21dfbe43..03b6be79dd6 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 78ca26be3b5..8ddbdb8faf4 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 96caf2388dd..3464bc68190 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 8bf094f9837..45d00a9c2c7 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 f45483bba0d..5889413006f 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 096ecac752a..acca4f5f81b 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 fb06eaebcf0..298113be19f 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 6852a67ae6b..3e52fb6bd11 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 b020b7a9b1f..33d672a48eb 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 52812d21f1e..246e7045f30 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 6ad9ebe5327..e4d958dd832 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 1f99ccda3b5..004092f6b0d 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 19284575878..923d62eacf6 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 b7126f60ffc..ff3320a97b6 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 9e6949622c4..829e914e06b 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 2f134025da7..a8926512ccc 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 84963a2c1b3..abd0778e606 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 df726700db2..a3b04510828 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 ae42bcce836..4dd5d04903c 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 15b47d8e695..c774256858b 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 5668ced91a9..47735466c6a 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 e278237f30d..af237f0a9fa 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 8b17bb9cf64..b223ee0e5a2 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 f5076680b9f..e882fba3095 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 6a6ea325939..1645ea77bf6 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 f74f6267d97..e358ebf30e1 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 ece4fb4ccc1..fe31cb5df97 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 feff3920bca..858aaa921af 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 8db948e0c79..1ddcbebff03 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 6bee1ad281a..d57f6ca0c11 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 a319758bb67..63ccbf5be68 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 2804d8e6f5c..9788d6d24bd 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 1bb1a565773..f079acbc8ce 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 4faedc00f36..a1ce560ec62 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 bb1186be83e..10d52afa89b 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 bd92180faaf..4231d770b56 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 7ca21d6b6e7..dbd131740b7 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 f0fa73390ff..8c82f68ea81 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 2b81833c614..538ebbb2285 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 9f393f9c9a1..8503f7eb557 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 c44c26b6f1e..1b5495d0adc 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 dd268512fd1..ced5ecd5a8b 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 afce1b37d99..f286f0d7c0a 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 249ae2b3848..a910886c7cf 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 a51335a5e96..d5fd1cad8b7 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 5e53a6b0a06..d8aace7c90c 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 2514fac94c0..28816f27de2 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 5f5334905cd..cfdc547aedb 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 9f988e64236..2803df37911 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 52b93dc3d95..f5de7e78336 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 4e843ee5eb5..9322a3d8f89 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 f7242b0cff2..6b2e21d0b64 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 3d923ed603f..3b17db701bd 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 280426204bc..5fa42315c33 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 c470da7532a..a9e5db73139 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 524c84cecf6..fa34312300b 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 6edd12e9310..d751f13920a 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 d8d7945bb47..8db0b2e56f9 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 322e53a07a6..4b583a769e5 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 e7c8569630a..5c9d3a7aecf 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 c0b4b744193..a14ebac2db6 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 35860db609a..8593061b132 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 264b02436e2..095fbb71513 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 775e308c68a..45a39e9d195 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 e4bd5a03765..3f540a6a76d 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 6b1f48879d0..7a9f047b1e5 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 983f9a04e58..b29a76f8003 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 2cb4bb06bda..7218c968363 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 5770789e299..c9fb092978b 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 1a730691b23..45b4bb94e0c 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 24dd884d765..86c6fe91071 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 33854bfb4ee..231aa54b227 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 7f76437bbf2..fa3c951ed62 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 488b7b49b23..41cfaa96b73 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 fa4e8c751b2..058d7cdcdce 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 7b9654c231e..e7ea700c39b 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 559090a1dec..59ff89e603f 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 2762d6e49d1..e869e6a8a93 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 055162254a4..3b71bee6d48 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 5e6ad9d1bb0..d55772e73f8 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 4a51c9fb502..e218d4f1a2d 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 e88fea5f540..246b8773d1d 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 1aae6a91aa5..d5af3ccb3ad 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 0a3722c2951..ecacb16df67 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 a31a0993ae6..8e3fea049bb 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 fb6f397b881..212301de96b 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 983f9a04e58..b29a76f8003 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 8a245cae6d7..76af96a79b6 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 f9203387d14..d26ca78bb12 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 4e33846f21a..729f0610101 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 591d3eccd1d..405ed41cf6c 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 37864d5f7fe..4c2acb8ca5a 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 d82b1170142..0eacf58f622 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 ee6548aeede..0c79ec89e87 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 e43268cbe19..d7280d163c5 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 dec306bb0c2..067f737fddd 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 c6ee8b59679..bd6ede58821 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 a08d98c2f12..1999c95a137 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 63e447fbbdf..544b1596070 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 d6910483610..9fa43541125 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 f9fd747f1a6..1cd3ebc60eb 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 adda912438e..c33eff65841 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 e8c83894200..b49a44398b2 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 25e18797bf0..3d79baf18ff 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 4f55c65694a..af5b0bc6b6a 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 1f1daa5ce72..531be01e8ce 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 487c2f8676e..3dc491e0895 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 c6c6741fedb..8d7789b6034 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 d5cd012c0e9..f3e9edc40d5 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 0e83ec67462..a1c2ae8df5a 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 cb0f11cef8c..188240223c6 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 b84c4baa78a..5b25d2596df 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 07799131987..7a77c519911 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 5bb7c0fb8df..07605603d18 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 d00c8eb5e97..76e1d60f431 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 630d7bc439a..b4448ac972a 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 ba124a4e3fb..2a93687375a 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 8a65fc04f71..856687623d2 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 d0708072850..3753ff8ec98 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 e26a80a0886..024c0fed501 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 04da50d657e..2ed77c3f47f 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 4af5a45af97..3ec57d5b1fe 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 8c115b6c7f5..dde1d9f750e 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 9466523ff76..f7d92e71ff7 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 d362c1e2c30..156e3ae12b3 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 ad27d3ad3e2..64dac54dfaf 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 d42f9cba576..d9da0eaa25d 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 5ad8e2f7e6a..6ea1bacd904 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 983f9a04e58..b29a76f8003 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 50311a20f89..228780c53cd 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 5ad43c5895f..94dd4410bb6 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 d1a4c7c9feb..1d32454fc49 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 f85b590bccd..5d10f1fac58 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 2093f3ec23a..fcb2fe5bddb 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 d47d455058a..fcd392a7269 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 972e6f77b95..e9b09fc6043 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 29faeacc5cf..b39ca7b26e1 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 2d6abe7060b..2d407b4e5b3 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 711bedd189e..3f0890dec84 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 00ea39a8509..f1ef49bf3bd 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 f939eb7a531..737b9b36d66 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 ecb9b792f95..2644c7cf9f1 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 a2b9e1ae50c..ca6d32f725b 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 606ea6c37a8..16eb3c95a8e 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 d35b6eb7a38..6918c3aa663 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 b80dbfe4337..ff190503fed 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 68c948070d4..faa6754b0dd 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 e9bdb89f26d..20900abc1a7 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 921dda5fcf8..c06c9741b1e 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 049134a716d..ea80a8a0f0d 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 b5619ccf12f..8372c09438a 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 a6c0eed7630..47382823127 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 c530d6c7337..6873a25c194 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 08393810169..db4b2fc4fb6 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 e9bdb89f26d..20900abc1a7 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 4b639b28850..b0fc463c45b 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 049134a716d..ea80a8a0f0d 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 c8caeb42d6d..e6251c4f4ca 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 7fe8fbdc42c..6cc11beb49d 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 f417a1edc9a..fc25f1a2796 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 10817e9deaa..a86aded18b1 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 88a3a825808..9a93841a42e 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 00157f0f719..d0f5e15a88b 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 d75a37e199a..09f171935d8 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 e9001026bc6..3ed1438cc60 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 9d23916eaf7..936a7d89451 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 b6bb2f692ce..03e2d2d5e79 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 01a619246ae..065236d984f 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 2994f34d2e9..380bc2cf995 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 9ef099599b6..5916d7dbcde 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 7e424bb2a66..71624fbf729 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 1d52384669e..371eb6d5c58 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 1522281d2dc..28f7d49e196 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 9730982061e..d0ec3d3a348 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 2900ca82286..4d0354cff36 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 dacadd033c9..165d0103c63 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 1a78b60b661..15275d21681 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 77edb93d07a..3ce9131f0f6 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 4a800e9553d..374cfdf2656 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 4fd8739eb82..5e78bfb07af 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 1f77eb2ace4..450baf1a963 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 a6f64e26440..6ebbab2b67e 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 00aae1d30bf..7b1f439932e 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 40f7990958a..5b847cbbd7f 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 fe851e1707c..0d5773ea640 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 3f8fcb4df81..d129c4fd123 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 d524c0e0a56..10e05411fb0 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 f7c2956ab2f..168ba71cf5c 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 bf5fdf52930..a11835e67db 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 41c73f36dea..3163c5fafa6 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 40818a5ae82..673993b7308 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 eb112828392..74d1bbab3c0 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 fbe91bb8042..3f7d41a36e1 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 b8802c8a13b..20615b87660 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 a1affd05a0b..a0f103c9184 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 51e4c73cada..37e3c09715b 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 4d325ebba12..92d8a0308e6 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 810900f105b..ac2856c5a9f 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 7383568b643..45aa3584130 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 ef2cf3a2a54..769530acd63 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 c75e350312c..55a4be2eb68 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 8511fb22e32..1a453114738 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 2ce01a4caf5..123e14c5dd1 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 4cf912d9540..4319dc20a63 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 3982b100177..d43b8968165 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 7ab9b765999..4585efa91a6 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 5e878d6aea4..5432c2ac20e 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 84963a2c1b3..abd0778e606 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 7a94b87027d..50126d38edc 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 18927babfe2..2a3d9bd2e0d 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 5242efc6246..fc81f474967 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 8dbe774f768..7713dc426f5 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 b0a571e639a..09e90b4b425 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 43b4e1e5149..e10ae64adc0 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 0acf9187440..caf77bf554a 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 a1903a3dae9..e7b9944fd73 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 cc8afe6bbd5..d01e3d0a4fd 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 aa244104dc2..7499425eb5a 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 5d54e3ff897..bf75608fc2f 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 a92c79a39a2..104975d5091 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 01367a0b938..11dc70c3b14 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 445a8967154..fefa8e9e90e 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 ebcfb6f8f14..e5d13822fa4 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 5c0c22fb171..effbc51ae55 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 9c836751d63..094a006d0e9 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 17866b2499d..13ccf246464 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 e956912ba82..a10e229e9db 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 1c03e06e391..6be0189f347 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 dfbc8918f5b..11d62b914e5 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 8b3292c5ceb..ce2edd12455 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 970bee6ba78..ed58fa7cd3a 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 a24e3fa7f97..5c0938e85e7 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 ca847b0e1bf..5fff55e82af 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 342a3b0bda6..a99e83e3171 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 cf687a600c1..ed825084fef 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 47b5afda2da..d44c815c7b8 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 83fef37a198..b583480d4e5 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 a42710a40d8..99568a99c7b 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 fd1dd71ab27..80a1e4862cd 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 cbdcad91dc6..73865c9e04b 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 0d115ad05ba..cb10c5e23a9 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 2d21ca4996c..9e642ac31e1 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 403ab10ae9c..5e8ff1709e8 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 1e3949e617e..3787075e58e 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 03ec18e3614..45407f5b918 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 9d4080e4387..df0584f2e22 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 41d22a36876..732b4f40864 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 671231f3a3e..8a0555c7fc3 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 ae0e94e9c9a..41957f54f3a 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 7f97f64a354..5004cc90435 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 1dd7fab9739..72c7808b046 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 dcab51716f5..b5e5eea4800 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 68e6ce93e56..347df3b78a2 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 6045065c66b..6e0eb5fdedd 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 5592c4857f7..601d2377158 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 2f3b5ec253d..fc0444861bb 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 dce38598a91..9bde96ef195 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 983f9a04e58..b29a76f8003 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 21e8d444c68..77356dfae6b 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 e4f20bcbf69..8f42289fb02 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 56bc389d217..2c349a7245b 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 1096ea6776f..034b7d9efda 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 d5315bef5a3..a10db7d5c51 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 22ef4d6c675..fb38ace86c5 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 99b6da10c66..6ee021ade14 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 f30724b5be4..5ab63321f6d 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 ecb0fcb9891..4cd3c8ee7c1 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 559090a1dec..59ff89e603f 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 767b80f91d4..262bab6a2d4 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 a9f8012ed95..0b452ecd00c 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 04acf77c212..ef688b81121 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 0b693444e2e..80265aac477 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 302d0e03a98..968e563a04a 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 1aae6a91aa5..d5af3ccb3ad 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 03804521908..1abc71da3db 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 5818896f140..0a0d4990f10 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 154af5382c6..dd2178788e2 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 983f9a04e58..b29a76f8003 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 5eed83b4810..33fb598d398 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 0736688c28c..cb12ebcf715 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 fcaf4ad41ef..afe1a0f5e13 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 de87c8e4fa6..99573ff6a58 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 0eecaff9d31..a2483dd17ad 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 69ab357620d..507dd44ed29 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 210550f3e81..240f84da06e 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 9991fa25f8e..cec932a7696 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 6797a9ca1fd..351bc4f867a 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 c6ee8b59679..bd6ede58821 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 0e7ff425f50..6924d97f9bf 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 3d4cf0b79eb..56b6dda2c67 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 17f61a20f8f..86c031018a2 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 69081966979..bf71065c99e 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 c7cc32e16b7..9cd0cb51fb5 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 0c49731774b..c0afa437b3a 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 deb78cfa035..0862c1f13ee 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 9eab58415b9..fdac5375492 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 b0173b3e2ca..f0aebe164e1 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 487c2f8676e..3dc491e0895 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 f941246c81a..a7ae6fcc3a9 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 c6e0a26de3b..626a53b7336 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 9789a2ee340..1facc5d9027 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 ef9f61756da..63805bb013e 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 4cd48b565b7..daba92df32f 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 50bcb9d7861..17de6102529 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 2e00f0af835..40b914bdb93 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 4439ad22a3b..e762c61315a 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 43875535272..1ff6ba538fd 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 fc25b80b0ec..bea7efd5145 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 817df04ef9a..42d580c3282 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 d6d3d503059..3c52eb1c7ff 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 355ddc941c1..3d3978b4555 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 c376a96d441..a7c3b0ef742 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 d24fe6cfc32..d9495252cf6 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 f0cf771c3e5..43da21f7555 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 aaec3d4a941..b75dec1f80b 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 c64b572736a..b2764451149 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 ad27d3ad3e2..64dac54dfaf 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 fcade545c91..c3ccd145b0f 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 583705963c0..ad4efc924d2 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 983f9a04e58..b29a76f8003 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 3387953587f..ada1dfd18a3 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 ac4c21c0cda..1f0094b2494 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 97910b5a94e..c237d462c97 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 2a619f712ed..f6cd2a16ab6 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 72ead375c52..0925b9fbe3f 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 e0178f19eba..0dba0b686e2 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 79780f57483..f5985f23d02 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 a863b5f895e..615e6afbf43 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 d05ccd51528..077b8df6ad7 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 711bedd189e..3f0890dec84 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 e65e9449efc..133acc2c710 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 261c3edca84..11a9f67d9f1 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 3c6e04b19d1..31becc6a35c 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 a2b9e1ae50c..ca6d32f725b 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 ca9c031f3f3..1b4468a6dfa 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 6d1dc7538d7..fba1b1dd83c 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 3753f152d7e..a434eedfb3c 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 a7af1a07175..183b42d43d6 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 e9bdb89f26d..20900abc1a7 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 f66f7181a6c..458bd96a7ac 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 049134a716d..ea80a8a0f0d 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 9cf9d8c1c86..5c7c8c0b146 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 a6c0eed7630..47382823127 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 13ea5763ae9..55872a45ef0 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 2da96f5db70..e3e7af1cfd5 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 e9bdb89f26d..20900abc1a7 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 10ae2f9cb78..46dd83befbe 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 049134a716d..ea80a8a0f0d 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 ae1ad272340..2ad2fe24959 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 4d36d20a24f..7d1632100c2 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 d7f0e0d12ec..fbcb988e4f4 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 6f1d4c685c0..bf915d5ea8e 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 55a5e5a0afd..b5c272c8061 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 2d7c0b69bb0..64b42873d5a 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 3e2ebf00b75..9eda52d4e44 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 896207d5672..bddbdfcdc09 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 17cc8e488b7..1ffc7dd3d03 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 4c962146aee..7d94552aade 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 02802b4c3e6..14546e9a9f0 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 d4c111ce8c6..0fc58a28cd2 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 b9f520f54fd..b66e0ed4f7f 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 37a7fd5f02a..aa1cd0ff114 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 48110ff964a..9c669ce3edf 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 7105913c5e0..d576e0712f9 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 aa0bcd6ad2c..f01ea95702d 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 9ec2ca48642..5c585eec377 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 4e714a35858..8033aad555a 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 f7393f6de5d..13eec247e56 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 3d0741f375f..d012d212c13 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 f8fa113c33f..cf949853562 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 9093a9caa2f..3f7b2da9d44 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 1031225875d..0157ef4e182 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 891c1ef85e8..88bb65666da 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 b5507d457ff..7ba186d37f2 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 5fe9fbfa859..0f3a3239223 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 a6897f1cf01..b3043e689cc 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 88c04133b34..350150964f3 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 e38247aa6dc..5325c91cca6 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 30fb8dd092c..a5cc3e490b4 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 3e7fd95b727..c97bb2f8c8d 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 344823463a5..00ab249c116 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 dcfaeb579b6..04972e6602f 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 f7a60f764b4..0bfb491982e 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 d928c8388a6..c0e674c01eb 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 e9efe817de1..b48f5f0255a 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 5bfc57b4874..686a08bed39 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 6f5f60e84bf..e6920a2a229 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 7dc54c095ad..c6b92aaefb7 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 c8d15062cf6..755192e1e57 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 721fa8c2106..3a5a9574039 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 e1276f326b8..1955ea7e32b 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 74349442957..7081531624d 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 5f6884653df..a9640c45400 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 8962d8d3a06..1b01ff7ce2c 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 b3f75fb6fa2..28bd3ae132e 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 645be3a8f5b..658a7559808 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 1dff27e9f6f..acf88afcf01 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 5b057de8624..336c6666519 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 ff49a98f481..b403529d358 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 71826dd0d1f..2f357721d98 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 9100d456aa8..671f3efbe45 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 b15e9632375..c5c33666f53 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 79bb35931a5..6f1854c61bf 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 3259493d34e..9c14c0b04fc 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 5f167d6648a..1cc59b2bee6 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 6e6bc31c361..abae4ad9fb6 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 93fd8c54189..96fd45c6418 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 e61aa0c8f51..60c23dc7e06 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 a7f88706270..f70875189bd 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 4a3bc5550b5..088d3a40fa8 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 b6db12b6fee..4b8b9ac63be 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 84963a2c1b3..abd0778e606 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 6fed1233d55..7c053bfa2a7 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 c24694ee805..8dd1a5dd45b 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 668b0050d4a..f56268501fb 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 3154c463de0..9998d5faa53 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 f0bd7ca5c14..231ad5e72a7 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 8adec2edbb2..2862513efb3 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 d7eef61297d..eded6bb8d14 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 8d9ba761e83..e0113ac5fe4 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 abe8e359a81..c5147603bb2 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 fd679c05750..bf3bd2845e3 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 cb6fdf9f53e..997c690109c 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 503686174f2..0ad5178c530 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 1806fa7c219..8e1ec72e34b 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 2753c95abcc..e868dff8cb5 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 54c039e6776..6480cac9462 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 de068b090a5..6de774b51b0 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 e1cca43434f..f2d163c67e0 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 c99bc63088c..9acb135596f 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 f6e8f942601..d52ba1a72d2 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 c816d618453..67074194ae2 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 fa9984713cb..67389f9a415 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 c560c4dab43..da915b00054 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 8f4ecc4b09b..e3160a0753f 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 63b0705c0be..bfeacc7d27d 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 ffa59ed6944..4a1795099d4 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 b2610282386..c7ad8f78785 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 8beb6215b72..66744489d77 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 743a4710b2a..631fba6e2d2 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 b775411670c..8a7e720bf63 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 d09c1e03527..6280c59b427 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 4aa67153ba7..e3b2b2aaa2e 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 b9330a163b5..f3d06e7efab 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 45c98c4a6d8..bdfd2c83fcc 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 318892131cf..26377faba78 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 e5d0d20c7a3..48fc4c47c64 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 229bb430709..48844b30062 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 1f358445b0d..40f9a5246a7 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 445c886c03c..fabb9938694 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 bf933b0ad1b..403b70b2d0c 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 01973200951..6ff386acfc7 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 4cd3a2d97fe..a61ce300e6c 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 7bbe61e2a5d..6893ddea881 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 699aa52fe45..8569c6513ca 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 dc764b089db..dd861d46ccd 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 00ba2cb1990..bd292faf0e0 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 4a5626878b1..6c219de0257 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 2628b83d43f..55b2e168111 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 754e53f9afc..e7941d21350 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 27ba8d53eec..999709fda56 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 983f9a04e58..b29a76f8003 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 fc7bec275a8..1513d83b2f8 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 8b8e236c49a..16f8d402b23 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 2138c049a5b..bbbcd0aa955 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 064ecede9b2..4ca29ade531 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 9cc8826f89a..a51eee49112 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 a22317659dd..e71f605c671 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 d0514f821fe..d658a133f6a 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 39dece837b9..40c6188344e 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 d402c58647f..d2831097793 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 559090a1dec..59ff89e603f 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 0dcc9a39ce3..d5bc4da5367 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 667502b1073..07c02b0631c 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 3192cd72600..335f5abf28e 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 5f3f3abb482..93c47f5869c 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 e74bb516015..6b65b05ec39 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 1aae6a91aa5..d5af3ccb3ad 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 a9fdeb67336..e92304a2899 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 2a706bbb30d..23b96b92959 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 be76a31059a..781312001f7 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 983f9a04e58..b29a76f8003 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 cfa7ce647df..397377b9295 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 c44378c1993..06d208c8b0b 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 a43100a9930..f0d25e1b4b1 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 9fdb8c184f8..32cd43c460d 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 553454414e2..e1f36c701dc 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 ac59a8317af..5d045364b09 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 a40098bcca4..f6803c40e92 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 ef9b7285d95..c25c77a8c09 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 781473b656b..9329aea8d25 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 c6ee8b59679..bd6ede58821 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 11f1153b67b..1dc97ec1301 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 0055eeef54a..d978e22f8d4 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 2831a4b4826..9f36eee07e9 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 d1d605e30d7..5a0d1c124f0 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 a053819ec3e..a2f75bf7349 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 6ac1cf6bc27..ae062849215 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 1235a36d8fa..752dfa01493 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 75eb9875d83..293806fc1cb 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 ca35a9f4583..831981e105d 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 487c2f8676e..3dc491e0895 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 31bd6d1097a..499a9a441eb 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 8fcdaef1692..1acec3be8b9 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 b42f6ecee1c..9e2a3691cd4 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 e5338219a03..583891e9de8 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 1a969cc12c3..15e3d071c4a 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 69a65125afb..ec54dab7976 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 c1a9b2353a1..df650c0270c 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 1d218d02ca8..8945ef0777a 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 2fd64080c45..39be76840b9 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 35351a87c36..9316e0bf429 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 dd2b0d3ca71..663473af0ea 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 57367e97017..ae387dc0886 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 3a1581f7063..4a506a60078 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 486d4259a5d..34dcfd5357a 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 960385ac927..46263141fce 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 dfbe3e645ac..1740694cb0b 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 2c9930f70d6..afa7a985e5b 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 928d9dd8433..c492b4ac417 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 ad27d3ad3e2..64dac54dfaf 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 a466b349049..a3f4e2d3782 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 b90f511ec17..37c3bd7436a 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 983f9a04e58..b29a76f8003 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 d5758d4bcf8..5209f51dbe7 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 5d1fc66538e..304bf1970d3 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 c598e3c69ce..b14ff6a07fe 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 8442b3db2a6..69e72fe93bc 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 4509f85e29b..d069bf19f92 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 0ada8ad7f7b..11fd81a46d7 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 85cd37860a3..e9970b21332 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 6579aa827cb..a9dadbf84b1 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 adaaf6c26ec..759384e1fce 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 028351f35d6..1f11e1b86fc 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 c653d51a80c..6c20f1239a2 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 4e29e0da1c6..80cc448063f 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 cf70d9e6033..bb624540d58 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 09589f65645..85992e3ab17 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 fb5e25f5901..b84c4c83135 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 807808f4996..48330432b60 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 acceaa00b73..9493159b3ef 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 52779f59bc4..8c47d2db5f4 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 1f3e4123f7c..985f688edfc 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 0a09973d3b0..a685843457a 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 8798d2e718d..a0048915881 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 a6c0eed7630..47382823127 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 8cee99162d1..859aca00f5a 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 effbe3d8495..91644399196 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 23cad4b2bf3..a6dc766c996 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 1cb777393ac..8a4f68c20c5 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 e350a10b9a4..6c5795f9652 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 420af58bf00..6044ad0c0e2 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 cab84776324..df4ef5d35ec 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 f5077198952..719185523b5 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 96a4520d598..70601d8c993 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 7171016089a..b63e6c43e10 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 1947da3af67..d04f2cbcf3c 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 527b97972de..987c69ff6c6 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 4aeaae33535..a8993224143 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 777d0933108..30e19324bfa 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 140afdba729..01633a806e0 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 86a56e0bb76..3ce97127fdc 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 2e607565e9d..9996af03111 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 09aa0139062..77cbd880695 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 78bfd062439..163f2cce997 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 d756ca1cad6..6ae777fa121 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 c4cc56de80a..0dcf357a75e 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 98cfdc31871..bd888d0ff48 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 43e665d354b..c87e1a6412e 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 66c18871f20..68c023b1be7 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 c1b35a13d4f..12a04afd55e 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 83c24849617..b81a0918887 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 51690bbb5da..1baefbf8a30 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 8a5353fc4ef..8ccda1379b8 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 6711ed59760..7af8c53cdf1 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 f46e609e6a1..a00e3ea23b4 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 c7dbbb7a641..8e0ed055408 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 099ddb2ff66..fd0244964bd 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 8d304a07ba3..661e491bbb1 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 e63bf63d159..2c0ad4e0942 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 d5ab9bcb076..8bec7934cec 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 17c0c3aee5a..bfa51c0cd24 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 c6581da732f..ccf305a501f 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 196a29fa773..c8d65b17ca8 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 c3a7cd5e7bd..e9037100434 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 5500337ec50..6b024fc34e2 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 20d0400c3ab..2036c4d6b83 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 efb0de5f6b4..e8ea9b072f9 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 d829326fa27..d5f42988bf1 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 e1bc5d13025..07f40e05e14 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 6e8205cc0d1..7cb312e511d 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 2a4796ed66a..232b3d53b71 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 ed006a7fc53..c876c43ccf5 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 0df9c93d61d..bdb7af2fba4 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 81d723ee864..5a0ab928eb6 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 c26910c0b80..5b940d634ec 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 87546e8b8d1..73b5860fe51 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 aef1d400472..fa304411270 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 f11f561fc59..e94798b5ad6 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 e8e280e16cd..2af87047e62 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 d5feeaf8d99..4e76522e4c1 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 eb42d538616..0f364606f1a 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 c3e3e736f02..f7ba2571df3 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 e7fe7fff169..d006b33e232 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 8dafa69a0bf..dcf20ab2b5c 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 22c0250cf0c..fd6a6cd3e4e 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 c5d5bf40f21..860e20ddae7 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 2e89b1e691b..691fdf8ef7b 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 67b279c9b80..faad81a1c1e 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 2b1562efb7a..9df898b1e05 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 07196dd168c..06d83f91ed1 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 4b9b05c842a..c788ccccaee 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 30d4f684980..1c2be4e37d8 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 5814a57ee90..114f2391781 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 e48921dc635..d551b7010b6 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 fe6f3ccadc9..8f57559269d 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 5c9fe29236f..0a01dcf4569 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 ffe267c85a4..bff30470380 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 106c7413276..946a2c0558d 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 bb41915fcdb..0a8d8b26611 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 d6fc9618218..e24f9d18fc6 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 5b411451e3f..47bf3415afd 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 84963a2c1b3..abd0778e606 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 4ff5b75d63e..916e666cef5 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 bd1b8df9f97..6117e4d67de 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 650329372af..23e08f003c4 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 e218c513785..52bb649de55 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 12dc4580630..beacc39b636 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 4256b620211..76988b85c86 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 49818908bce..fbbbe8834fa 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 fcc0f28c5e3..ceffe623c2b 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 4be592d32d6..144c6735e15 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 e4af2c66656..4b81f235322 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 b76a564fac9..e09a709142f 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 803cc63f1ac..29c4bdfbf86 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 221eaaec1ad..d9a6d3f1b8f 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 fdf0c4c6180..92cdab4c8d6 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 797d4d9248d..cb09dc9db77 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 1870a2b3c66..e0ef7bf51d3 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 1d9c8877f98..47de9df5f46 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 868d7816a87..984ca87e94b 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 714d1fe650c..0dc95ccb886 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 82ed54bf143..2fa9bc9ee4c 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 63689b09998..c540912ca1b 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 34a2d4cbfd4..a86e4c3a649 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 cdb01942062..803b8727ada 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 b14c60b87dd..508e659ef02 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 a40ecebf2aa..6711c56bddb 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 63c88800e37..5d0ad7cad57 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 cf3e26b5042..4f4115d042f 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 791ecd374f0..8f7c440bac9 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 a46bb1f367c..faac08497dc 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 5307e27ea26..be373a7e13b 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 6c58ed26acc..0c97f7ee4b6 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 ae1c534ad50..dccfe73d9fb 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 adb0fd5ee8e..1326b2ee39e 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 590cc07f81f..d4be5379e0d 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 8fd31ffe09e..d3f537783a7 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 c544e96f49c..df7b4ce28bc 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 7cb99e0ef8d..fddcb4bd0e4 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 f8879bbed2d..c3044cf5454 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 dedf91edb60..945d8c6a011 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 334eda22151..8ee4ab13cb1 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 cae0cab743b..4beeb5a6cb0 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 0f90f06f599..b61c16b05e6 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 6110944ed4f..0531df0ff7f 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 f319d6a55f4..f7087a319a4 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 67439b019fd..aec654d2036 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 5b46f99b06c..5af572c2399 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 f90780548de..ea12d8cd70f 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 a451e015534..662b1769778 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 138459baf69..5af49361510 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 983f9a04e58..b29a76f8003 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 a009f0e59b8..0ba155fc928 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 252abd6fda3..dc1cedc40fe 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 dc05c70d8a0..d77b1eb0c55 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 02f96f444e8..898fae7ca60 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 4a4f6553f00..fdf0a0a6a51 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 e9c699c84f6..3ac562d9196 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 ea2405d0952..b521d4c8ad3 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 0573ab1be56..ff504543cc8 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 e6ce1bcf8aa..c8e82a3f929 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 559090a1dec..59ff89e603f 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 e1bc16160fd..896f480e903 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 bdc7f520406..cd32f6994c1 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 8fa6c671ab4..2bb3f149a94 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 0ad22763575..5f20e67a6c3 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 cd2694801eb..8176a15bccc 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 1aae6a91aa5..d5af3ccb3ad 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 1ec7acef889..cf4e1cd9907 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 dfc9a5a774e..ed8cbcca6e3 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 edbc184aaef..b9ddd96fb69 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 983f9a04e58..b29a76f8003 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 6a2bd296c5a..037141f637a 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 9b298052722..b0e02ed1a22 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 0a0ac5c2dda..fea764c1b27 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 67318cf1bc0..b765cac13e6 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 8eac2866019..5f689ec314b 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 1104b4d9c21..13f30dec9d9 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 98d04bfe7dc..f6e4d041614 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 bae3322109c..102b02d7f73 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 5babb767e56..90ef425686b 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 0650ad574bd..230a907cd74 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 254052570d1..cc1b212ecd4 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 00db7cee58a..baca1d53850 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 bae317ba884..19900d159db 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 62baa0432d7..2ffbc5648b7 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 fe0fe4ea82a..79042a8a213 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 e1650f5e8fd..38c1e116400 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 e10c89a100b..48a5f8cfd22 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 aa43586f821..6a89df953aa 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 2a2b3f08519..5d9a89a0ddd 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 87ba2189ddf..834a6b8d7cf 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 64e6942be32..474973fed40 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 983f9a04e58..b29a76f8003 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 6fb83660977..a54ccaac17f 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 ac10b66e659..f5b09e83728 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 9dd602d3ea0..85a0fea0226 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 e5817a36363..895b6173307 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 d365c15aaa9..7db4a9530cb 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 b95da8b6b01..0e936011f15 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 4bb59970fb7..4678f68ce8f 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 1c5a8056a2e..5f88d779892 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 3a1289c5eef..949166f5a59 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 c6ee8b59679..bd6ede58821 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 316d2172823..07f330b7471 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 0b7ddaa3726..d1edfdbb16d 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 d5ec7ab6042..7bc3891a330 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 2be30675383..66bba41df40 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 69ab9b4202a..e23375df2eb 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 75780f6fda6..fcf5428b83c 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 b29c19615a9..d245d261ca2 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 c26fc4813f8..346c3c0b43d 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 d45f4b334ee..18d33c60325 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 487c2f8676e..3dc491e0895 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 3ed213f92ec..c6328ba4efe 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 ca5b75f5981..2523240dd4e 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 a8d4e360432..5b9e69c889e 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 2a484890484..e6e863536e1 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 a3ede01fc26..d4669d16ee4 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 07b256f1718..4b5a8aec6ce 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 d006168692d..e3f8b870fad 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 b9c1bd5f206..ee74eeb4d97 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 973ab1d788e..cd29aa0fa54 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 9ba54072549..7f1fd762a50 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 a8dc82235af..62a152ee958 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 4a436fdeb4c..f0b44e07673 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 ecb8d01a042..c751c873b64 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 f3d406f7221..87a19c18f56 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 0c40e8b4a68..5aa1d214859 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 95e6cf234e2..113e10e0cf4 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 d2cfa949623..92530422ec9 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 f24fbe0d596..b0e7b32b7e4 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 ad27d3ad3e2..64dac54dfaf 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 52dce93bf0d..858c59ebe46 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 edabd902676..47a58c9e207 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 983f9a04e58..b29a76f8003 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 a3386cc2316..47f943ada85 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 2cfce303552..2b31cae07f6 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 271e0256d8e..aab55fc2d0e 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 e51c4b42491..db641b0ca20 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 339b6ea13a3..5763d63e0a8 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 4563d55c28e..d1e1cc5a133 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 52f9e805caa..da84b6dd0b9 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 7d6239066f3..2216635d023 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 9bdf25210ef..952f06bc9ee 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 cc28ee67fea..13c597bfd2a 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 f3006bc32ef..30105e55097 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 f1aeac4922e..31ee8da93f1 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 22a9a7184fa..7bde1dabd17 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 e20ee1cd357..c81f1f58759 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 a6c0eed7630..47382823127 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 91660db0592..d29115f5b4b 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 a9acbffc72f..30a17ebb5c8 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 983f9a04e58..b29a76f8003 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 f92b9c26867..0fdf1d3bd7e 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 b75da91bf02..128e2c152ff 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 cd62b8e50ff..5b237f430e6 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 5ad71bce1ff..af7270498f4 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 3e392b2dce7..567eafdb174 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 e510ea21302..241432de2cb 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 6d189781006..7f4af793276 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 d991fc820c1..c4daa6c5138 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 19a8d50befe..9f25e59d8b6 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 b65146b937e..549ec31e256 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 ba419ae44e3..d7b9cc42ddd 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 b868e35b954..c8e5a52dc1e 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 272956a54eb..f508c1eabfe 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 685e958e432..0faa0d61df1 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 b7651761214..b830a82a5a6 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 c17015efe7d..956580da108 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 c18760716e0..fe66d524078 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 46e76565698..5b1f5415c45 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 cece078ee0a..ce7cb4189b6 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 4c2b716c73f..4d09c044186 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 38bc54ab4e3..5308651df81 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 5bb9807e874..2e64eb83f3b 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 998e5158568..87edf548442 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 00798421c57..bf26110a9ae 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 96c3e6f06b0..90a3caa8dec 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 45e1f33765a..db6fa8fba72 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 1622e92c762..85e8b1b0d54 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 3cb5e641fea..143eb0daea8 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 849bcb4304c..9d728876f46 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 311cb221f8c..775a2cafd85 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 f96971d7f43..6f9ce47bc0e 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 ca714552944..761b23b727f 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 b9e45d342c9..214d930e1e0 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 3c9b1519070..fabd490e605 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 6389d68618b..05e2a0da76d 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 7f9759f92a0..ddf57d7a99a 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 51cbe98b696..a8d27cc8870 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 060fe935cf5..1afbeb74ca9 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 5e9eddfe2ad..49a7a36817e 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 819e39661ca..e7437f37007 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 ba6e325495a..8b9372f9c0f 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 8a510c8c916..4d8ac482547 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 3aa0b8bac65..37d996799a7 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 7e9fc47bc7c..30bb19d1fe7 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 290ae964014..111804ff614 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 4ad64ce8dea..caf613f7f00 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 a3ae37af567..f55c3eeb348 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 4139ed3d855..39aa8b64874 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 0ac5aaf6b3d..a3502841726 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 dd9087fa3f4..77871eaf2be 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 528c04f14c7..ac1c4062b44 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 bdba4b91b0e..1ed366a1914 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 e7a45e0aa56..095924582ac 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 e69f03b7f0f..3ce489c57b9 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 96d54ba8ec2..50b3b9847b3 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 e585163e258..959175d035a 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 c92598bffb3..5fdff5f34b1 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 857f9c9a3ea..1bbcf2dbeff 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 865dc31c9cc..3e8170df1f8 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 3380d90b4c5..83235c8fbd6 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 e830931e794..577cfa79f6f 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 313d4c589ad..a666ecbf813 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 8b8d3fa67b2..71f608e28dc 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 1cd2a5925e5..78e5e855138 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 84963a2c1b3..abd0778e606 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 66e53aa1f75..0df61f6a2cf 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 8208951bb53..de50a1746b5 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 fe47d05ca88..24773997581 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 f3b4117780f..b957e585a3d 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 67b1086ffdd..a9639000bf2 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 a4d489147dc..437d0781f2f 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 513013ad21e..b59ea4a7af9 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 c7ae6bdad36..da2edcaf152 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 9f3a84e1825..b81e64d6fe2 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 ae55266d5e3..8f4ad9e40d9 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 7a42e3c6a28..9859462e478 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 8ec398f85c7..9457efad46a 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 cd25e5faf2c..8b04ccd1e3b 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 d663314dfe2..29de012382a 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 6f546bcc310..889806c5af4 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 5e3bf7f8ec4..abb9ad9499b 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 0439dcf6f6b..e41e1a51e05 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 e05583ee18f..acdf676f0ab 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 8df1b34e404..8eb12858ded 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 6f5ec4118a4..ff4fa99c53c 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 0e4c0160671..3a671f0f0c2 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 ef2f769b635..5293abc9ada 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 6eb99c539ac..efe23c5e7b9 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 006b590461b..af1b3bca3ad 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 139b461d4f0..a78d17b8e23 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 2ff07598557..2e98f42e969 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 c437c9f7ed0..aa6a1cda988 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 d8c8e226822..7a8e97c0c94 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 0f3201f3acc..65029c1e65d 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 ab140acf346..d957a412fb7 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 4a8304b1bdf..8441e542199 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 6f055103b02..7b03af34e3d 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 9f956d7508f..52d45572d19 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 7c5e6f82556..b3a35870c1f 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 aad6a41c390..fd1cc04ce57 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 7bb0fab9d2d..b42820907d6 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 e6f3f5d7308..97a2db7ca4c 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 27d527ac84b..4160e1da96b 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 7e2233363b8..60b1f76a084 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 3f57a1c6c6f..241bacc0d7a 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 c7b29ac4eb3..3b0121edaea 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 11beaef6fc6..e3923315c8a 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 9ad4ab19235..60696d396e1 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 5a5d104d3b9..cc5bab786ac 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 ce2aa8e02c5..89a44930278 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 d602f4e7cfa..977cd5b16d5 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 b1be18aa309..14f6bb10da9 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 53b745ad8eb..f882e46777d 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 a7703fd8992..dcadf39b8b3 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 983f9a04e58..b29a76f8003 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 8de80d7fbd4..654ee4a8c55 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 3e0f23b0aab..9606c2b8d35 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 1f3e5f9bd29..17da3df44ca 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 88feba05627..89174fbbef7 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 64215008bdf..fcf02dd43f8 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 e0f5b4f60ff..1342ea885b7 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 a5731b9f83c..3ccc068afb9 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 e0bac200ff0..6f8f07223f0 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 18f3315ab05..a2ddf3364c4 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 559090a1dec..59ff89e603f 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 0f76729b102..c962f5adc7c 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 e0f35977c14..fade60a84a3 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 c3afd39b9fb..0c74f0bbb5f 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 60cad1da795..937a379cc40 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 0697bd13d77..a3a167b8968 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 1aae6a91aa5..d5af3ccb3ad 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 436b69259bb..993f92beeaa 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 c4f507575aa..c11d45a8cf0 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 d90f44b0094..5de11170607 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 983f9a04e58..b29a76f8003 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 881dd461cf3..5df549fa8e1 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 df4c72aa3d1..a23e9273c3d 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 e4d02dc5ad3..02fc8543ac5 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 4c04ba56eb8..803b2fa2164 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 cce9ef4d71b..110544ad925 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 12dfb435aa3..fa2e69241a6 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 49c59ae2a3f..580ba39745b 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 36414e27ac5..fe085db43ce 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 1f5db3de708..160ceb940d4 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 0650ad574bd..230a907cd74 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 029a8a7ef55..2ccce5b32ca 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 900f906cd09..2d18df2ae63 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 19a5e5ffb40..05daa976037 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 a6c5ae42ecf..41327ad2eba 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 0c7dc8ceb0a..25c494beea3 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 ae47fa1e2c6..35bdceddf3c 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 0fb013b64a9..a3cfd92bf35 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 5b6ba1b5e71..423593f42cd 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 3782b69a7d8..9a632f890d1 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 787a9475a9c..9c4f87f57bd 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 af740acacb5..b29900f2d19 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 983f9a04e58..b29a76f8003 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 ece189cc3e4..c5c1e59dfac 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 6263bcd069a..c6bfebdc84a 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 58948a24864..83179f3ee08 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 149ef23611a..e81bd49b2ad 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 01ccf5ca6df..e2fc2c4fa5b 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 31278931eb9..8fb0282c58b 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 2cfd9859e14..2898e11522b 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 4fcadb543f4..c88b418b179 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 62bd65c01fa..937cbb43120 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 ad27d3ad3e2..64dac54dfaf 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 97a78ffaa16..a92d954e9a6 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 d7583625edf..70b82bb7737 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 983f9a04e58..b29a76f8003 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 c63b7692e5e..5dbb35fe988 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 b3e79d2b082..9bca64e4e26 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 1fd1f9e1f78..281fc5bf354 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 1db76b29c72..0b784c62b93 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 ef03e97be52..cb85089b2fb 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 c1879d06c8d..621957c3485 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 ceba88c4758..7ba8eb408af 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 b35caa60cd6..81fabd22c48 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 d695aec4bdb..18ce0efb223 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 cc28ee67fea..13c597bfd2a 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 51c153b830e..a0aa0b2e80d 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 35ce25b3d7c..9ad3e03ecea 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 8f24171fca0..77d4fc45aff 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 b54bb20a0e6..28c10f25d92 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 a6c0eed7630..47382823127 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 174cbbb3d43..b8ff7a4ed31 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 3d57ec45331..0414d665052 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 20b2797e60d..7ccb6f00425 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 261792b1926..cfd932a9f85 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 fdc875efe60..2c733775253 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 65ea5618ecf..1d86c2f4813 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 9ce1d184c0e..49620944e31 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 de43b33c77d..763b04a7c76 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 3888bc7f3df..f4fe8988311 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 226f1e56fe6..76a43b7b83f 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 cc43e269e60..a56465a52e5 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 7be3e5cc465..4eb24ca1650 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 378d347c951..e63482cf0b2 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 1b5faa6295e..8de542b098c 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 f7aa78f2deb..d482c1dd1e5 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 db4426160e6..52b676f99c0 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 df48a206382..c9346489756 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 a43157ae9d6..dddc21d00ab 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 d0a668c4c85..77d6ea32753 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 661ecd8801a..3681cd2c5f1 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 c529788ce00..5e237195496 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 af6a2fa50fb..7915fd75264 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 20ded0e45e9..2e1bac89f20 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 cf0424fed89..adbc1b70e02 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 49c77ac745d..db163f2ba52 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 7feb521caec..d82fa5fe452 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 efe517c5e75..a47ec224658 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 11054034f36..184a75e27d0 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 dd3e68c27b2..3febcec3506 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 9865267ced7..fa52384f59d 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 ef4f0cc26be..841daef3f68 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 087e4dc1e89..ea39d0f56d7 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 3813194af91..c66e3db9428 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 67d4a956fd1..d3ab6750cb4 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 0c19b8acc10..a945c76b63c 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 54e25741fe4..93146989c36 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 bc814499201..a5151b833af 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 8e15d6df3c9..5dcd817b643 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 e07727d382e..12b21891ee9 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 d077706f197..2caa33f33c7 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 8360be2ef3c..e2107b1f676 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 5838e2b9068..8e78bcc9f81 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 09644b9f3b2..c8079775f7e 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 aa7b0baa414..45355821eae 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 d1425e8d8ed..764233db178 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 3e7aa4c3680..20b7831dd6d 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 3a1845d1147..80193f59964 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 03412b87ae6..df8f1bc09c1 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 b693157220e..878f307eda9 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 9a5cd928305..87953cbcbaf 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 84963a2c1b3..abd0778e606 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 474ebf7e6ff..f84a302e670 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 6ed5052c280..0a49cc65307 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 7e7307e856e..432f0fda20a 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 9a445738735..4d4e45f10e4 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 33744f718d8..0e05bea81e8 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 e9cdf09b755..2c5ddba0c17 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 881d5181d39..421e836185c 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 8ef47c61610..0e14e7f71a7 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 c42b1831744..01605e814ee 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 d57b3960b6b..160f47fdfa2 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 26a8e2bffcb..71e46a3ae43 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 76c78242554..64d1b9e0d4a 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 916e4436308..c52e64816de 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 1b9f8889eb9..95b3990befb 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 67ed532dbb3..68e059617de 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 37c40a7a02b..c55dcb5deba 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 487e4e7c8f9..66167fa389f 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 e53b962bc95..b57f86337f1 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 c2afb93dfd9..53b540b297b 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 1ab2bd4cbad..134feba8a22 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 c3344c9a989..606d1f99ef4 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 24be0c8fed4..16c2d87e6f4 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 299312b593f..1f53c75c9be 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 b3814429fb0..95ce8a3811d 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 8f6468d1754..dda58d333cd 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 9f15487cc2c..355d5e2df3e 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 246540bd7a3..468c07dd071 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 8343e947d6c..1cc06ac2359 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 4dafbd4dd18..5360c5e4683 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 bbc9831a019..1bd611ce4fa 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 788f23f7152..d7307c85e77 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 c367bdfd413..bbac54a513f 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 ec26278d17c..86e68dd1939 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 5285b1d2921..e2426c30caa 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 0b0c4e75262..d87fdeb526c 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 f0aeb9a37c4..a85b4d2c63c 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 c9de006369c..633b7b9999e 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 f97c6b748db..fa47b8a7849 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 8fa1374b299..9bc3682be92 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 7e6611586af..26f6e73edd3 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 eced743943f..69c640e39cd 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 00862d02e34..a287e8703f3 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 edadd679208..ccfea4a29b4 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 7246fbc49ed..f0fd2b919c1 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 6c6ff5d8267..48a540af89f 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 65729202953..3f3f79212da 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 9699046c258..c455cad018d 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 6adf6892868..0fe9d66ae88 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 32367f3943f..fe69cd76b11 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 983f9a04e58..b29a76f8003 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 d61f0e619bd..02cc028ab4e 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 bcc40f7e99d..246eef01bf0 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 b50c31850c1..a279c7d6d24 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 816b4c10d34..bad1d45a6cd 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 0c52100daab..b9a75d629e5 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 4b5b2e5e0cf..bcb6ffbbf91 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 b117fd97e3a..9fe6b6e74bf 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 43d5429a7bc..dee08c5fdb9 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 bc52448f2ea..65896fed822 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 559090a1dec..59ff89e603f 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 c9e4d6fa508..765871e92b1 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 fe621aaec32..a2dc5f4057a 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 14dce8d1a9b..4f106e91829 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 5f4d3feea14..7c27120086e 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 c91b6ecfcc1..b8431eb29af 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 1aae6a91aa5..d5af3ccb3ad 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 9cde88d8c40..101656ea420 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 73df2d1a16d..ac771267a7b 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 753d2f41eb4..e6ab2113d81 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 983f9a04e58..b29a76f8003 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 4afb7138fe1..fd8b01e660c 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 9251fc4f03e..a06e3ae992f 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 ea261c1b145..968bfe687b6 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 546dc2c25a3..02fc2d1ff03 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 f35c3053a90..10dfd6dcbb5 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 aa7ede87d07..6760749e02e 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 84ac4e7be38..02ab98e09bc 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 2241dc14f53..8ca6ecd74c8 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 a3d3468060b..59d259c3d89 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 c6ee8b59679..bd6ede58821 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 359e1767435..b65444d6147 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 aa540fe66ef..1c6cb2150bb 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 01e692e74b9..2fdde8c8bf5 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 3fc15c10536..d2b8be2cbe8 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 0e748158292..0cd37208d3e 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 3a9b87e42ba..702e57da1e8 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 690ffd3388d..e95bb3b3467 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 3986a3c52fd..5a8ace0723b 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 28e48464e32..f26a1fe3df1 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 487c2f8676e..3dc491e0895 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 7ec0b1a0a92..7651d6fde51 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 f91f30a5c6f..16c7e5f0373 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 778fe05497a..71d15566557 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 e75bacb3de7..f5d3f71265f 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 ea43d328fe5..e4c722dc379 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 fa4ce561012..5ac596b500d 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 d640ac34149..a3103375df4 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 62bdb504ee0..9cb97a57f5e 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 9c53691c1b3..e5e859cc896 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 6f223e4af5e..b3dea22444f 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 35d781b48f1..71eb6a26d1a 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 4393cf9db16..0c2364b0994 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 353e46d6a08..67366024e42 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 df358681b23..8ef3fc74d15 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 05d9e4c1dc9..30e01870390 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 91cc995be3d..60a811aa8d4 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 2be30a42cc6..5f540a9e78e 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 7ca2aac5139..8f06da39c3b 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 ad27d3ad3e2..64dac54dfaf 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 5c7f7dcbbe0..e9b4017881b 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 4273c022110..2e59e356ee8 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 983f9a04e58..b29a76f8003 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 0cc306f484e..887d1f752ab 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 1802968fd6a..d55db32e828 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 79f1dae8f3b..e120fb97a58 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 52b6e4823f4..7ee14c1fd7d 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 8af2043b597..c01fac287e1 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 5501d3f784c..a6872c8d76f 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 07ae804b720..7ffb8bf38d2 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 413ca169908..d717a123bbc 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 d2d0117204f..c924b4f6694 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 a6c0eed7630..47382823127 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 d7526879aff..66e173fe9b6 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 4563462b95b..c869e661093 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 20b2797e60d..7ccb6f00425 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 cc0f8db697f..86757a272f3 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 7dd09f3fb67..331ea252e0b 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 73dfea234f9..f41625dbaa5 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 7bbd65717b7..526f2078d0b 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 5d7535f55dc..c3af39a4871 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 274fc490555..6ea358cd305 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 61393d074bb..5fbc69c5d02 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 950a686ff03..01e621589dd 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 2ec6a83a2ff..26bec99a6f9 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 80a44a2d724..2d69705f016 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 670a727a949..1e4ba4e8198 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 7319e1fbd61..673b77d8415 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 94c85df8845..66d587fc400 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 f20201a7c82..1414544ed98 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 d19a5317af4..7addc24b502 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 9c96bec1a07..52c060e7aa4 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 870fdd8cda3..060cff495a7 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 ede2490b482..f7920a418ca 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 16bb454f7b6..fd1a99d301f 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 77d3e23edd1..75fa18bf553 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 e882330a10d..c02cdbbd957 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 516ceabc881..70fe161f747 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 83b4780333f..87d43c1d3ae 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 a0a05d0f826..bd3828c715a 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 8036846101b..30523e5fad9 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 5921decaab2..1a16a570dff 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 efab5193846..2a0e3794efe 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 28577c0d0ca..6877814c5e8 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 2d1c5290903..81674fece87 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 7ae95d91f0a..1b05b5ab943 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 f459449272f..ceebb368abf 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 d8d4b6f411e..e3cd69eea8b 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 e78a59ac7b7..3acda8f414f 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 033a7f4fc3a..5c2488a8762 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 d7a2abfa90a..e872c0fa6a2 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 42db8813e43..79370098cf4 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 2bcf5c6cee7..d508dcace12 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 641eba06814..1ccdccc51c6 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 afd1c30efff..4df09fb347c 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 ed627de7bc3..a82b73de7b2 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 915b04b8e20..29d3a3e13cd 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 d2aa22219af..a41f06490a4 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 e095394f995..fa29c8aa56d 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 ac4aaa28c0d..9da242305d7 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 394824e2c59..8510cd8516f 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 e95a5582ce0..050fd4fee33 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 d05f51ff271..1a07bcd3dc5 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 84963a2c1b3..abd0778e606 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 38f98918087..a8f9faa3062 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 ca48a911c62..05612becd64 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 a2bdeb9322f..97ec224eb82 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 c0339fdeb8d..d00943a18b9 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 447c583d695..2a0fd47b3b2 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 49c84fa0fe7..1daeba895b5 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 80a292f2018..836333228b8 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 a6c5bcdcd56..fcbfd51ecdc 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 9cb34db3cff..14368d39b82 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 792c2ae2583..d1e17b1a45e 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 6994d992b37..6d34fe76a97 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 adb140cd1d7..45191c43ba6 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 0c6f0a72b4a..e2441a62763 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 71a02998ae2..83fe36e3061 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 7f75a5b53c6..01134278951 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 eb968b241bd..957fae792d1 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 12855ca20fc..4a31fb79173 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 6dde31ab690..d75ff0bc44e 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 e843e66e5d1..c947a2539c7 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 bf2f3296642..0d50ea27bb1 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 dfe2340a6d3..e50231967a3 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 19d41869636..71eef3cf865 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 b97e1d1134b..da61e78c9e8 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 eda90788df0..764f7ed6719 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 8acdd345f7f..e0c213ed927 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 81208ad347b..079a0b4c42e 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 10da5cf9cc4..f5a61c5c73d 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 738c8f594e9..201c6718c5d 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 ea380a22780..eceeba5f094 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 1cacbd85f3c..c5666596146 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 d748c1574c0..6add87e4f88 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 0a87945e600..c49cc1fe62c 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 23919e22af1..b76da318808 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 7d309de59de..f46c04323d4 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 9d7bd9a2382..41a54ad0c65 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 cbca06f74cf..e15a8d36d8a 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 0b0315550e5..cf7ca3842b3 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 072534e43aa..9e083c130e8 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 23f65191ff6..cbb27b435e7 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 08f52545267..c0dbfce271d 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 f7b14ed2b4f..e8fbcdc3c44 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 ed1cd46aa2d..18ce850bcd1 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 24fa481d7e9..8709929eac8 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 c170e013a23..7b59770fdcb 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 faceafa65b7..f5c2fe4b6ca 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 9f9c139d06c..5ef839c65f9 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 1e3e73b8133..f138bb782d6 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 d8cd2ce40ce..fdc4225520d 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 c8072680f95..2ee0590b4a4 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 983f9a04e58..b29a76f8003 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 1086ca7d84c..13333b60e16 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 1aa2c013a0d..3f054cd0ce7 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 4a254bdafba..790c46c2e19 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 8ec7d25c92e..eabcd9ed5b9 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 9bbe27933d2..fd830f18929 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 36313413abb..d3f0d1af267 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 0802a6dc635..3a93dff3711 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 3f52f1e1c69..1c8bf5a77f6 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 78a0a80b2aa..513615abd8c 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 559090a1dec..59ff89e603f 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 35cac42d442..63c0f04bc18 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 a9401037fa6..73aa71850dd 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 2219b97b16c..e5fa0093f0f 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 827c5cce9db..5a4c7aa5625 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 31de4f49ef8..ff2e3aebd21 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 1aae6a91aa5..d5af3ccb3ad 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 e9c02756208..d382f4eaf95 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 ea9f3b4d002..b790e456bae 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 c8ee9822143..17fddbdd387 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 983f9a04e58..b29a76f8003 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 48e65250aef..2a0ddf7407b 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 71d52e9aae4..818e71aae31 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 a3ee0a98d4e..a16b2dd43c1 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 ce68c7b2768..5ecba55d52f 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 fe3d46e3fa6..99953f0e8e4 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 b43ed8f1e18..31e1a8f1438 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 f919f97e47d..6bb53c01447 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 bbc8d7c5054..21d711c71f6 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 cb807db589b..8df45d948e3 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 c6ee8b59679..bd6ede58821 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 a86abc49bfe..11ffd94a2c5 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 10d7d4ec953..c7b5ed7ea20 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 9edbe783401..e2598ba63ce 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 87fcb8236fd..2379d20a1ec 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 b627047eec0..0e5fdf555a3 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 ad5cbc6de22..e20f025cb66 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 fc32d07df41..2130214a7fb 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 9046eb5eb64..f3bd70ee7e1 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 7d3efc6452c..2e5bf7cc36d 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 487c2f8676e..3dc491e0895 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 5e50473755e..7fa9f4fc3f6 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 7c416090ee0..8b7075b6a2f 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 cec0b2dcc98..d1d445e331a 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 f9bcfa260bd..154e51bc5b3 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 ff46063cff9..c16cac9c084 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 27c7fe32b64..9ac99c81ada 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 e2ab26b034e..97d5d040748 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 f4990fa48c1..5fb365293dc 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 55ba87c47e0..4501aa24a76 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 9fcdeecc1d1..0d3541c6a1d 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 ac23a1cbac9..76402823c04 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 7cd8ec97773..5afda763692 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 8cbbbe016f5..ef86af29a61 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 82fa3546ce7..8099a3fb288 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 df60391d754..b78334a181b 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 7a9a592faff..25ce65d77de 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 671055a7af7..0013c5599be 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 3e70e0bc2f9..8cb505febd1 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 ad27d3ad3e2..64dac54dfaf 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 a1ed90a8a7f..4b4836d2c25 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 f213fc5a388..c92d04cf4f8 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 983f9a04e58..b29a76f8003 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 da9fe0d0af4..09eae49d12b 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 5d00da65c07..b2428843cbd 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 e1cc78ad782..d063d3539b9 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 018d8957f55..73917baf0fb 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 506317e98c8..66281121213 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 4c84ca3ceec..f884a6ac531 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 fc05c6588a4..5abb8bbd46b 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 234a13231be..bc2e26b2218 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 14f58fdcbe7..c5ed84cc690 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 a6c0eed7630..47382823127 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 c89d0c32d65..15b620b624d 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 3a14de66743..8cd875c60ec 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 447e3026277..b7de62afa73 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 e205b0282b5..558eeb8a5f3 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 b44c421387e..df3fbf6a412 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 f3885f16aeb..9148b4a918d 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 56ea4aa01eb..abc210ba70b 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 dbad612831e..ae3ed1197b0 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 62ab82eaa6e..e05cb401850 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 b1419916a76..dc46db3e259 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 24d02b9cc41..f2b8d1aefe1 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 782dd825329..f3808aeee09 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 dcfae74a8ef..ea8baac0955 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 b9c504172a5..8ecf9129ce1 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 18d87b1b232..6a54f0a6a9a 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 b417537aa13..04fd2b4d643 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 f7eac3eabb7..0324a6af094 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 87e3db91f54..d3030835236 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 c234a2398cb..615be06984c 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 f7497e22ec2..19d2d936be5 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 4ce89b79e79..913fe3a3b43 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 647fcbf6547..60b0924bc49 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 4e797b08e53..019260e08a0 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 b08f4031db8..1fef52848e8 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 9b690df9379..6f8d4f46ef3 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 ffda10bed5d..792e75dfb09 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 9cdfed9e491..7235622e080 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 7902fe0e814..63bf6e8e5d6 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 f20bb91ac58..df1447e3479 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 44b53d5a1c2..287f22f7ed1 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 6105b1693b3..9c0d0e5b1fb 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 c98e089a7e2..62aea5b177b 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 57202f26705..11b9465ba37 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 fedb0ccf645..ce50a71431c 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 daee497c337..30455c79395 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 5391c67330b..55a71196869 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 816255d84bf..3b5ca65094a 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 bd6f7cd8b91..df8f2014955 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 32304632b4b..c0c9314b134 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 fa7e6fe6fba..8cd393aa112 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 e55a8c60880..df8a800968f 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 a2702c1bcb8..89e5808c098 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 809be87ae60..42f33695300 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 f7e58cde440..70aaf18e88c 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 d8decff8e3e..34c551658e8 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 fc34904fdaf..4eadde74834 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 0cf076e98e8..89544a43e06 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 331e22077ce..c9a878319ce 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 8b9e2dfaee6..deec50381d2 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 7931d3e4bbc..ef7c8b13f14 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 5c31777eaa8..fb373582bc0 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 a6d94989d20..1845792b852 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 032c8127003..818d7456e82 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 3f5ea520be1..6737c5faf98 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 32f40e2baad..3440ca0a5ec 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 6658bc6823e..c296bfaf1d6 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 8a0c44d507a..360aa73cd24 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 4215a2cb639..80d80fee696 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 e37747e15d0..9b261932159 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 096d75b61d3..44f2f658232 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 1210b817146..b2076173b5a 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 25241092ece..ce8ccdd0e23 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 cd454d0b86f..d43bc2987c0 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 ec89b5c7434..86cbc88f026 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 6a10271918d..d1f7ba19c72 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 21e9bfff787..e48cd63e575 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 6ea7e1691ad..b7ba392892b 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 ea1d2d34bb9..17d74e27a35 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 eca2d44430e..d85a238804e 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 435f2f58d80..e6354b4f025 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 b345b8fd2b5..9142a18ed01 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 4d4acd70158..12768633786 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 f385d9d4061..e655d644bac 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 426f9b735e2..a275674c005 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 d8b47119b8a..72741171188 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 87ecc16c1a6..9a69bba06c8 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 bdf63f319c5..2e910a4ea55 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 6ec434238c7..6cbffb38e46 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 f4a61501b02..de7c8d14bd5 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 6210b0b1fe9..8e1c0fd354f 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 cff41466517..c5140ef758d 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 8f31ff90b7e..720a178bfe2 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 ade52e50703..dc27a3559fd 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 3cf198a0095..d8f1969a1ba 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 c6ee8b59679..bd6ede58821 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 d6b93959228..f0f9211dbc0 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 5e6126824f7..ce8e8518038 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 f8d3cc58136..7db734ef890 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 63595fc3d65..ad0b2fcb4c5 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 75fdace1418..01dac2f90a3 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 2444253abfa..be7300eb1b2 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 e5ddeeb75da..4a25be336ba 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 fcd607c1bb6..12ad6244b91 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 e7373d4fadd..4f6c928ac91 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 487c2f8676e..3dc491e0895 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 d01fb78fdd6..ba096e0fd3a 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 56910e140dd..4aa959c4bdf 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 af699127b73..e0770ce0d6b 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 28c77ffa378..cedd32370f4 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 d2a8a3380eb..cd909a5b3e5 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 a1b1679e0a5..cfb235a70f2 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 b7db191e259..a6887d1ba77 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 9f85f9b20e4..d3d99ed3bbe 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 08be9ea71ea..96c9054e8dd 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 e3b66273fe0..6130db46647 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 5570714b635..1d6d96ce762 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 38a4f118cb5..0047314aed4 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 877a61174ff..b2579f886f4 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 b266fa6844e..802d7d9a323 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 3a201945aa3..6565fde7e29 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 4f3a4ad4fc1..021d19c2f31 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 60d07bead5e..7af9c67f450 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 37e4dd28b92..4954022ef1b 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 487c2f8676e..3dc491e0895 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 54d5e055833..51bf672c50b 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 55ebdda24f6..55fa2602beb 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 3da355fd9ea..38b99e7f272 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 c93b3427c48..8a25bda3000 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 5b569e0ad8f..3cea9d1b3c5 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 fbcc2800d38..565a824cbb0 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 56cce12dd33..081162eddd2 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 69d76bfa04c..d458c11440a 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 b9f387d7c9f..a5bdeb21713 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 35d5184c53a..d3f17ca3803 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 0b37a492065..b23689ed567 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 17f24ed3688..92a05938693 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 aab0c482d51..d3cb5883272 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 88c9e81d4c0..a989cbc3c02 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 f6c8324854f..33cbeeab516 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 b2351c3c843..0bb12014962 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 8af1deacd18..c3e3bc7b142 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 39f6aa90f1f..5d0b0b11a49 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 ad27d3ad3e2..64dac54dfaf 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 0afba14bfaf..435cb69e197 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 81e0e984c93..772b727970f 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 983f9a04e58..b29a76f8003 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 23bffa398bc..602528aacab 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 b206ee853df..baf973cb037 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 38a7cbf4ace..3bbfadf2ccd 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 dc1c429b409..1035a58004b 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 1f885ea446d..f602d05ec2e 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 95a058837a6..b531acd5a12 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 ea9f8d77d16..0ffbb93b22e 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 162184ef86e..1a8eb566fa9 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 d6e67034b7d..5e99c4ef0aa 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 045be1eae4c..b6d36f3fe69 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 90588188d28..5977a2d95b8 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 5c442a6df56..07491b38dfa 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 f8a81fe7434..7d2292c8d9d 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 bdf42152e15..08fdec68591 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 f6142665aa5..9140ff4b72b 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 3029a69495d..c026b27e936 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 ec3f5445c71..884ca1a28b5 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 7a865fe8740..fac6abd26a5 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 c27a95d4ec0..042da7a94a4 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 b47a0223f68..b25bdab31cd 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 97a761091a8..b04783c04aa 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 4a647260776..fc22207abe9 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 51d6af7fee8..a7737146792 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 81299ad36ab..5e16bae85f2 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 acc10966dcf..51bc571e698 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 84963a2c1b3..abd0778e606 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 cf3b40be1b7..58b380929a1 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 8ae1ef41066..c4226ed9d70 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 dc730dbc27a..4ccd9394651 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 dc438e7f627..77c127a96ed 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 024e71354fc..ebb68d76d74 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 f47cd56ad29..ca020a35ebf 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 eccba11e001..b668abe8310 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 184ff1f1286..1933ef0674d 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 82b3361aee1..9af6e79a193 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 14ce7707f3f..5c702a71e3c 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 952e94ec4df..c5118f13272 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 0b5c42a8daa..66fc067c4fc 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 17ee0d297ac..fcd0ad39583 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 2e8f44fb444..b913273bead 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 3a6669fea75..f9324e7ddcb 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 0197156bf3a..a9a7356b293 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 625baf33c41..08e7c2b6b79 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 27ff0cbdd60..6fb7ee8e43d 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 2722689fc80..a416669d51c 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 404c653149b..1d12640b950 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 99cfa5e2c83..70f52d6a8dc 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 f5c2de47a3a..43cde061a37 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 a403b39de51..df2552acb18 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 53a8f4a905c..7002df7446c 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 72a1fba87a3..680d058e4a8 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 8dd34616b77..47298887eb2 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 b8ecd5491e3..a77e882c5b5 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 b8526c7be13..8308fcac623 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 d713b83ccaa..6121f399603 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 8353a9ce85c..3619aeae10f 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 0878e830fa3..fe0453fe128 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 d880beec0f3..0fe7fbfc9f7 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 faccff6e048..e1545751413 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 0d38fb64079..b0ea6fdbb12 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 9dc395f0dcf..aabd234cc17 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 44f7d1467f5..98de9b7a91f 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 f112f01faa5..67ef7cc9184 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 a97f713b49d..ce0b2a65da9 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 a88a0e4d00a..cd50ef9da6f 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 3aeac08dad7..9676928c3f2 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 2ee3292cab1..b659cbdc6bc 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 9b672ee07de..8623a32c86f 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 360738a8080..72f8b1575e5 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 4b9ac0239a8..b5c6f79adac 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 31e43cc3d14..9df35d7dccc 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 979316ea1ac..8201f42f659 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 94d2be5eeff..5c19832c9dd 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 532ffe1ca28..f332fbe51fa 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 7d37f1fc9ac..4eb31fb28f4 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 983f9a04e58..b29a76f8003 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 3e18885ee2c..bcb6c021b3f 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 c741d272aa2..6ade3102f7d 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 348d48e4155..2a783c86914 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 729e103009f..f8e0e9df608 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 c3d5f1c98c0..b81756226e5 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 15629ac8c06..87754c7bca5 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 40e50c764b5..3ab91cc8049 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 7913c8cf42f..23864dd1d69 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 0576b165aa1..605ad78395f 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 559090a1dec..59ff89e603f 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 61c42e1be32..3c2ff82b5f3 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 e4bf249f88e..a3a38cdeaa5 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 d9c0cf9c9d5..eb093816218 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 a61b9d7c6db..ff88047499b 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 4cf82f9c3cd..7a83cadc385 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 1aae6a91aa5..d5af3ccb3ad 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 0edfce7cc88..8784a63105c 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 88bd1b70484..42c2e32d91d 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 a1d2b0b2277..fd34521c0ee 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 983f9a04e58..b29a76f8003 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 520e1bccacf..55c69c32807 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 a2fa7c5ca75..ea903ff123c 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 61f6a2ad88d..c636ca3cd3c 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 cf675316f33..0eb0f4eaee6 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 9f3f0cd0585..0f5a10cd547 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 5def13e178f..d4b1402adbb 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 5d1e709181a..296a7d4f81c 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 820e405b6c6..139ecdb2c0a 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 00ed3955db2..1ace76c508f 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 facbe33f884..4ba3ea340b5 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 f0cf3ef32dd..6f9b0c608d3 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 45487fc4018..f14e891b76b 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 969f92ca90d..78fe1c71e24 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 6bd9de8dc9b..b34d68929ff 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 14ae7c1b1cd..ad6bdcac729 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 c446f36508e..59306584e4a 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 a84f5bdfa00..59795070fbc 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 b8db3895875..4991044ebca 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 ad567b8234e..a7a9e1e9d0b 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 ac8c98c1cae..2c7c081de68 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 568e27ee015..631262ee656 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 e71b6d17ab8..a851ed98835 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 487c2f8676e..3dc491e0895 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 0998f8d7c61..1cd9ed2be22 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 8142f9c2c4a..e3b7f4a0b96 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 bee2f10a0fa..251f9629264 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 3d8a4c52e01..cfbf4a876df 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 030702141c0..029499196ac 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 d9f2b8822c5..052c629fcfb 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 98a4c669ec9..28610abd102 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 c1cc6ff2f0f..17c5cd7265e 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 e538e652977..9a7c3b9a007 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 7639401e678..2a534af3811 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 eb411ef6b34..b2b6389798c 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 14d845faf05..26177e397c8 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 5172e37f64d..347f732b9c1 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 c128527009f..d7c94e16567 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 dea131c72eb..e6c5e7ecf31 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 ac4a879d8bd..50af853d5ab 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 e99e36c74be..005f351015b 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 90c9a41c030..6141d107a7b 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 a6c0eed7630..47382823127 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 c7f45224b3f..50035f327c3 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 b32b0c38938..a76fad42a80 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 487c2f8676e..3dc491e0895 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 64fb753b22f..0c2b702faf0 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 b769ab07518..08cd0029ae2 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 2465bce324a..568c6a68b80 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 2a4ceb17c63..2b67a9e95c7 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 a1be521b613..269eefa740d 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 737d1f4b9dc..3f2e2f154a4 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 7e9933e1971..ea3bfebe382 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 3cfa0050918..5f2eba8ff22 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 772b3630fcd..87526fb00e4 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 7c36df75cd3..742a5cc48e4 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 e22451a315b..98708cb0720 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 6c3520feb42..daa122528d3 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 123806df8c0..140fe8eda97 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 478f7ee8a18..c142d7feac4 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 b60eab533fc..bc978104ccf 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 836e6b54ecc..51196d7728a 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 37317b1fb3b..1d0636c5582 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 244a18e4434..93205f86c86 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 4ddd3b6c1b6..1619cfa1de7 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 9e73d8fe6b7..0cdb65127e9 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 b5e5cd77c60..444c051fabb 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 89e367d3ccd..e159b600c18 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 90c1cd01447..b2430e6bbf1 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 64720732aed..203c636ed6a 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 d917df0e55a..5868e4e129a 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 8b783ab2928..bc1984ced49 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 6a3413d1c16..4229b653ad0 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 cf11b25b8de..f80946f8334 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 73248ecafc3..7cd769101a0 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 c0d020c9efe..5d23ecc4ee7 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 2efc97f9ee2..ee19ac0169c 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 a068430d952..0e8cf7b6a60 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 11a8a5e3578..980e0f168bf 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 5744d6e312d..4cbf0d67c9a 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 d134ea23898..68cb0f0f233 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 b80fe586913..253ea18641d 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 1f87a8e244d..b9625be9d6a 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 97a19ca7b17..6cda2ed1c5b 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 37fdd828750..630a24b8e1e 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 803912a5c6b..2b3119a7fd9 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 76e1d9f2ba9..49ee5e4f955 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 ad96e7452ec..fe653bd646d 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 aa78b60db9c..dcba58e0fda 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 2b16a1057f0..a710b9d662a 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 60b2314f3a0..154eb2d8eee 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 79e0c7f6935..97285345295 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 380248af0ff..13ec5fe2cc5 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 cdf7cbc019c..985b148a46e 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 9bca0016849..ddadb6db9c4 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 e83bfc19a35..75df2cbf0ab 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 a25d7caec02..7ca14293f1e 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 7e4d6b125bc..5406c25a96c 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 48dadda6252..79096cd4ec9 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 db22bfe0fe9..5a8b030f43b 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 9b36602566f..66e04f110c3 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 09e27c8241c..299a02eee7f 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 50afe541e85..0d861ac1e4a 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 396f193bc8e..2beae60de89 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 e7dfebbd39d..3a7d422a590 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 7e29f56d03c..0b77702c13a 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 6376fa0424a..05a47c64a08 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 8dcdcdd5af3..adee8d18db1 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 1ab92532732..ffe7f9e6a70 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 931c3e72f30..65ef8a20977 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 fdb9a4aafda..c02dbf090aa 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 67de5030d0a..42827f1d1e2 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 00811ade79c..7d24e0b66ec 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 c1218670782..18bccebba07 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 de33daa3bd9..2fc2d1e2533 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 80418d44495..f9c8b14f05c 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 c6ee8b59679..bd6ede58821 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 e76a054b538..f5168393d5d 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 54264279976..405989a60f8 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 1b3a72edd43..2a32f06af19 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 a065507327e..3c944a22eea 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 27bdd3c9dab..b42f014260e 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 8f815e99574..7acb87135b1 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 21f0c01b95e..b35ff408e7a 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 c9721f4f206..0882239e4d7 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 67e3aaf5406..f3c238ab3a3 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 487c2f8676e..3dc491e0895 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 05549ca1bc1..bca1a72a612 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 1ab81da06c2..697b02a6b0b 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 e1ac6519c0e..c2fbb6c1e3d 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 19560648ab0..92f8ab48fc3 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 105e43e3467..f885125e3e1 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 1cb80d6cbfe..f4f0015a666 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 ae6d665c420..b93a379a70e 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 a80ab1431c6..fb0ce45d36f 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 1ff501f23af..763d776d535 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 7c24bad5aa7..06c7f9f2c48 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 ee70b84d163..f4727a12ac8 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 dada8fa5b7a..7a33be3ead2 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 f7fc3fa2c98..c0185af74d1 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 8f74f88bc80..89d541d0115 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 ce63c66ac69..b669155b417 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 2291bba26f1..1a6443ca7dc 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 79374274dc9..7dd5667f810 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 30e8f48ac99..21d2a137cd3 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 487c2f8676e..3dc491e0895 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 42106fb6e36..9188a80261c 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 30a351e8a20..776e9455de5 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 44f70c4d06d..932f30c62ae 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 324d5843871..7023dc9be9b 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 c9e43e890ba..1b0144fb6e0 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 baa768531d9..861147150d6 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 b90b5689ca6..cccd87039bd 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 5871314e23e..4073bdb3e8f 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 39f0eee96fe..39c3e33f0a5 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 1691cb8ac7e..550cf942177 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 070573cbff3..37443979243 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 6a48193da8b..3d64ae85136 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 3df78d50136..701400e5c9b 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 7f9b1ac6bb2..ea6da855685 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 3489086ee10..0d8b39f63e0 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 1e6d6888a71..7d7ba38f5ae 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 228c16104b2..afda60e1416 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 681c29a7b52..22a829976af 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 ad27d3ad3e2..64dac54dfaf 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 8fde9255aee..c816d967067 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 2dafda1dd12..871e0b64b8a 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 983f9a04e58..b29a76f8003 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 1f2f2d58009..98e98109dca 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 3ef761def32..b6c779dd41e 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 3f1c48c5da0..edae24f9a77 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 1adcfd4f5eb..2a712dc8a98 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 a9201d7bb5a..8a612009f23 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 87b78677175..cb4b6fb1a15 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 9441590306c..2d6f8011e9e 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 dc3cdc9ea25..ddacd658978 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 6acf0c37923..64211a7dd0c 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 aeae3564f66..22860e3333c 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 1be1bc6623f..c25f14241ad 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 64022dce332..148598b0051 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 b2319683f6a..103026ec050 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 d6a29333eb5..a72b512277d 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 a2b9e1ae50c..ca6d32f725b 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 823cc11d083..fe6396543e9 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 8f19e8dbda0..f724062bf82 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 28a6655e5da..418c309d6ab 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 0feac95b0c0..3d2f98d28a5 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 e190f962c46..e42ccc4d0fb 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 547b77925ea..a6c8222db35 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 3a96862ac81..4bd383a89a1 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 536a51eb754..0c91bb9ac2c 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 1a4355f4a6b..403d8622624 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 b868a898492..cc7f4e8b345 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 0cdbb4bea07..d6cfd606087 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 326b04b7b3b..5c5a323ae3d 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 f23896ab79a..b3256325eab 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 def633c999d..7628f518a34 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 4320434910e..67c8302162d 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 a7fff3113c9..5b5bd868e12 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 9be2f5b2530..9f4f57c4779 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 a6c0eed7630..47382823127 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 e081d5afb42..1ae9bd33bfa 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 30192e4c768..e65336844be 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 487c2f8676e..3dc491e0895 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 27778487a17..eef2a4ea6ec 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 e1f75edf4d4..aab0d55aaae 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 312a02d5ce0..7225d9b3860 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 ffaffc41f91..e928c24842e 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 0027d0a2127..7ed4b7f0735 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 031e35e51f7..8d0dbe80a49 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 a4865b260e8..fee96f8f59b 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 51c2258f5a8..1beb33b766c 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 edfeb482def..9291fe88471 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 f3aded5297a..6659c5883c4 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 5ae4be1b430..465be23b364 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 c1e797cab42..91e34761688 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 9e85354e33d..8b0f98e7478 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 79b3b6241e3..cb75daafcf6 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 01381353190..56da451a4b1 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 04e6af971d0..059b3cb34bd 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 1d56af3ef45..88788aa4f03 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 a41484018b6..ea0d2424c8f 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 bedd4ba1767..8d5c91b29e3 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 64f90d21717..4168239fbde 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 06067e6253a..2c5f28f6be4 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 81bf53add06..8d9b296ceb1 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 487c2f8676e..3dc491e0895 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 7a43ae88925..ce76e410fc3 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 568990ff41c..342585163af 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 274b1b8b4c4..662d6999671 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 a8de5654243..ab7966cad83 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 a8685c308a8..6879823073e 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 04a5f8c8e6d..db6016717e5 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 07073820238..fdcd5bcb86e 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 677b5ffb56a..9eb7908a591 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 230928b31b4..cb3663a08be 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 cd20c2497f3..4641a7d8524 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 a07f81f4d78..ec608078b9b 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 5aa07587dbd..ab11758081b 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 0ba7eedf259..ed44eb56e51 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 c00d6aa7274..ffca5e09b59 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 11138193deb..123225f3ec3 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 a22dbdc2e64..0f268e3bf07 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 b146cf917a9..187a84e46b3 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 af8f1166a97..5756f1124f5 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 5720a81de32..126790d7d6f 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 d409d569b68..3fce3d2a4de 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 dde36756fcb..979a279c123 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 e91fd0a6a0f..087dcbd2f92 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 f8e989e1cfa..b5a5a07276d 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 3ba1dc5aa10..3bcd2f641bc 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 0d87ce5ecbc..c9dda576e6a 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 3e267577ddb..5780bccb50d 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 7b0402c39ff..17e83416c6d 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 ccb42a16d70..94a4f56df2c 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 796ceb7b877..98974db6cd6 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 338bbdb9cc4..b058b09b7f8 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 e2ca30fd2ff..7b5b295e5c3 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 94bd2a8604b..91ba9dfed21 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 2a4ac2190bc..f617fcab8ff 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 5cc143a451a..d04abbfed5e 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 c1ac0bdf4f4..5c52b9e357d 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 b6e788a00cc..0bb05f0b596 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 b2dba315b1d..644ddf34d83 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 93539976224..358dbd809ff 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 0c177c920e8..2ada53b52e6 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 8fb3207d641..3df5e480207 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 080953fb828..7193570d932 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 3b0333b2a2f..1f1fab26dc6 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 03c65f00382..343dfb9668c 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 1e7e7208ea1..519d7e83028 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 5e07bb0a428..4b370730bea 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 6a0a783a09c..7fdf473264b 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 172bf32c3d7..52bb88c69fe 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 645582738cd..4d52e79fad6 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 4be0110caa5..fac8bd38833 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 238784b899a..14a876ff28e 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 5b65c11bbf6..a3aca24e91b 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 f65cdc8eb0e..196c61611b0 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 7e1300945b1..e5a6d420c61 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 7504a623aea..022a5428ca0 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 e35d3490eb0..73e69737ab3 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 088bcbf3948..393547b7b37 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 74539c3812e..f38aa6be0fe 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 5156312543e..4064a8662fc 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 0b0472cd8f8..03cdd294007 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 71bc7cd5926..f9d736055ae 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 9e9df6fba3b..73d3a12f14e 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 cdbebdb2493..b40ef87f366 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 866cf54be1f..c9e8db52b18 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 734573ef997..26cc615f4bd 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 815c1bae4be..d8107ddba4e 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 a408cfd8dd6..2abfd8c56a7 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 2fb554304df..37ad17ecafa 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 129b29f1ea2..90baf207c7d 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 2f296dfbda6..fba4858ce52 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 2e4ffbb3500..632612db205 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 b666cd2c46a..90f2019099c 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 55aa5f4d1f3..6042f994f4c 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 656429380e6..75fb2932e56 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 94f2802dba7..b5cc2e33083 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 f5bf876087a..d955a33afb2 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 c05ec609575..055896c517f 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 6496c7ed159..d503ba1561e 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 23b3b9f85da..8acd02c4430 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 046b687fa35..948a5182f2a 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 ca0e06f9fd0..f1a279f43db 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 eb8724a7801..bc2ff890f06 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 96cf12216ac..73b596dfa2c 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 f813e26ec22..afb0ee1df8d 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 bec2e7d5760..1ad5eb3f210 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 3c5f008850e..9f7b34de614 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 8c4d587d7a6..7875e6fc21f 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 ccf2b54b742..731ffe55b50 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 5d7073a9d98..cdf9ba47568 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 8ddc3870dbb..57734e3d026 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 a6f8c2076c6..56618c13bac 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 84963a2c1b3..abd0778e606 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 1a4875e8989..4671ade7440 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 10cbf7f7dd8..f90efa4ba25 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 2db34d2622b..4e02e005ddf 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 5eeff0d6fa5..1e944fde7fa 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 c4a12bd449c..394fabbb544 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 24cc4b1b999..d2b79bc35bd 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 b71715bf29f..a6478901b0a 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 ee5e4db0267..93a88a1c1a4 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 930c56bc1fe..dcc2dd214f1 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 cbe572eb80b..7b80c7ebdcf 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 362fe8c79e8..92bc4e5a50c 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 d957fc59f9a..b5b5450ac97 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 df12eb21c61..cde076bf5c4 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 e18b90496f1..f0983a2da2f 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 9fa86c3e8a9..09995cdba2a 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 b0b604abbb7..f9d83cff513 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 4761c74032f..13c66216277 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 684eb088e32..6c64a5c1bac 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 00678044252..801b51ce82e 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 4668f2de33a..281c505966f 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 694c6f1dc3c..bc078201b06 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 bf64969740c..f4a27b0c522 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 fa6df4f9da7..e53be67160f 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 13c463f581a..af2633bbcd4 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 a5729303006..2f7692e1cca 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 498bb058a9a..454c061ac55 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 69fce097d9e..40f61ae67b8 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 b91bdcfd311..b9637fa85db 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 cd8459256c5..1594055b8d1 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 d7aea9e48fa..6a363b8db9a 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 289ce89008a..1670bdb676b 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 cb6e9034eb7..645a7f4f500 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 8899abd5c5d..882831f1b8a 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 42ae13ee9f1..9d686ceb36c 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 7c57e9e6d34..640ba5df5eb 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 95b7c4a7832..95ec0d73c8b 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 9e32ce793cc..7378318db76 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 ea1c42223b0..178287bd149 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 d16a4ebf15c..566902e854c 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 00ec752d895..602112cc7af 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 0b21692cb28..95eb9108ecf 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 f2c9b03706a..446d0dc308b 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 127194a4dee..b16a0676d34 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 55289d4726c..7196a1a3143 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 64f9e6079b4..df4daabcb5e 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 673d41178c7..0d2950c94b7 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 de0c351cbce..34c8001ebe0 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 b2296fbbbeb..e1ff5af2ca4 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 85b51bd7db9..1a68e625d3f 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 983f9a04e58..b29a76f8003 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 642169224bf..a9b30838b85 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 594fc7b5e79..d23efa51559 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 e8b801a4b78..df1ef561927 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 21173688aba..adad47fb7e4 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 e23dac1c185..d48c875a7f1 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 d502ab5499b..e7d2648a3c7 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 a5bc61581ee..f0e8e1d45ac 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 05697d9ad50..83da533996a 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 a8a92b7f1cf..477f2bbadfd 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 559090a1dec..59ff89e603f 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 053d1fbd0a4..0f0311e853a 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 efc8fa2efc2..00742f437dc 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 28aa5f798bc..2c0401bdabf 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 7778d8636a3..0f5529704f9 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 2f8d10168bf..26640b07e35 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 1aae6a91aa5..d5af3ccb3ad 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 cd0bd44fb26..81ba9219698 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 bb83bb8ab18..7bee7a4a4c0 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 afabbf89a29..6dbd96eecef 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 983f9a04e58..b29a76f8003 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 119469fb4c6..56e5fa25214 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 77d065df681..47f0c33abc4 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 955e17dda05..f7ef9e6b661 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 438242738b1..270482164a5 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 10ab76a60f3..89d3adeae17 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 b145300e113..d36fdad2faa 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 9338458da2e..b8977033500 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 107ada45481..0ba1527e2f8 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 c1c204c9437..f356e541cff 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 c6ee8b59679..bd6ede58821 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 28d9abcb1bc..28be96d6c4f 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 24a81636ead..2b784f8caf3 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 c2d4ec23e24..4891392f76e 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 016aec1f5da..9afdbd597eb 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 3b383b9d263..5b3e9d6525c 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 01a7fd43539..c4153d57f9c 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 a064b500338..ae5caa8d730 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 193c8a215f3..ce13b1b4a28 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 d148b3a0060..78a9c6f7af9 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 487c2f8676e..3dc491e0895 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 1a12954971a..09ced8ec15f 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 c2c353777c5..a6cb3b9bca6 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 907171acbb0..2d5f59b99c8 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 9e2744b00e1..0a625e34c56 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 cf24fd5495b..b79db7a610f 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 79d4b6e9387..5299fe53098 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 597bf9fa5bb..08919463906 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 6f666c8c73e..2f79af2332e 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 dab25c2ba12..8379f239bc1 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 0c5b97149a2..a6fcc77d209 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 0ba2cb95b7a..782714cf1dd 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 beaa465b728..1383ed0f3b7 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 b774dc7da6c..30748089add 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 41f253aaadb..ee7c9fcd31f 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 344321a2beb..67a4901b66c 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 6d3321a0e81..3b7454191a6 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 8b29932a399..0f9f2143afe 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 09f4179834e..6342c282b7e 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 ad27d3ad3e2..64dac54dfaf 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 2b37aedda3e..79afc680f80 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 dc447df7e8e..10d91b8c90c 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 983f9a04e58..b29a76f8003 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 992adc73b12..a4a6aa51b4e 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 f0c10a5c55a..8eda1670911 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 d4f13671a8a..4989c785f4c 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 49fa2063d12..937a4519573 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 70b659bc1aa..f31744972ea 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 5e0a310d615..d9e5febb94a 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 9733a530e73..262b0ff32ab 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 fadd24a1028..6988487f241 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 2009543af4b..56143410c14 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 a6c0eed7630..47382823127 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 c5fa4e0d851..6c53171f7a4 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 fb250b61f54..c589a8cd899 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 983f9a04e58..b29a76f8003 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 0b08a548a0a..09381da9853 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 09e7ca6bbd4..2e7b45a3291 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 384062e837f..c7ee259e28a 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 0b9014fa2d6..54f37564177 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 b3612f44c76..273ff780854 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 7dda60a6e38..64e7bc8fb5f 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 006b8c33548..87c4c4293dc 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 d1597573a97..c093674856b 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 e37fc18d8e8..118babe8954 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 7ed88f70d87..2e64a1d30df 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 27c4eb8a453..8ee9b39ded5 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 11088efda46..ff9aa49f25e 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 77789749093..85feb2b8f2e 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 ee6441560af..3eb2ddc34fc 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 e55fcfebf50..517ef9274f3 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 eb2230657b2..c72af0b6b1b 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 c115a5eb37c..b9cf913ed53 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 9485d6adce0..2ff9190b41c 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 acda4a02535..e9b8a78eb62 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 d5644cc252e..375ebf3a50d 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 2d9da02b400..08c49991d1f 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 66a299b01b3..aa6eff24ac7 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 99a876d118a..ab9c984e93a 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 232193161cf..170286a0f2e 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 184fd7f8de0..a617d9ed156 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 a22b12d2d4a..d421ff0b301 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 0b96a0d8661..db29ad5d5ea 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 1d9b17b812e..7691d0295d8 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 b037f8a28ce..a056467b7fe 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 fb62a1d5f15..415fcf29216 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 a42a6f7466d..5a20a7226d4 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 df4507bc28a..1536860d447 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 5cb6886b1a1..2f79ef8607b 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 d04addde11a..9f5b6e7d337 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 557cfa633d7..8b669f70716 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 314071039db..d9c2773f9b0 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 bf61a8fa452..7e6edc140b4 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 adb41669c23..5690c853a0b 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 16086cd84f2..800ed7c56d2 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 ac66136354a..73a7bfe7d96 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 f9c05de61b1..db6aa388d7b 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 d0836bc0cfa..c8425a094eb 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 be3f53a874c..7fa7b11db99 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 45ce6fcd4b5..20b24cce564 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 96084ac0bad..3ed3b0b431e 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 2c7b971a76f..88273957032 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 9934131e2f4..b7b352ef139 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 1920c675485..b12a67db3ad 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 e95603415b1..e562b59bb13 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 6c802ff43c9..b4a398d1932 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 fd6309fccd0..f44c6700d20 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 4f3f91367aa..62f65476f9a 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 45c78b22d1e..7ccbf9c7d49 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 0da4d138de1..ec77e3377e8 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 2e983fc4f5f..607c95ce1e3 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 55d1ffd59a0..49983b87160 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 1b4179823a1..ab44d41452d 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 2f7ff07638b..815dc09f085 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 474901b9a39..6e865f10793 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 fa1523cb915..821fd4ac9f3 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 755eb564ec4..3942b59ebee 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 a33fb45964b..3dfbd9ef405 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 56276c6a6ee..99bad5032ff 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 a7533675630..a3c4968bdf8 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 34a9a5bf758..e268b4e49bc 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 ee4650aa01f..5af9b525bc0 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 68ddbb68835..aa514ad3531 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 4fc5e8f7c13..fe94f814025 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 3810b57bb93..04390f240bb 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 fc812ec6552..225962bfb63 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 8232b6eaa11..afefb89e218 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 8dfab89361e..d8ae2a947dd 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 a0fc87678e2..2dad45cfbe4 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 c1666597bb5..dd943055c29 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 15ab69a3d34..9f652bacc7e 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 5b68812efe9..689dcc89971 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 f52e54bee6a..b942b99f343 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 a92e00a2fc4..5b83c6e75b0 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 98bd3f0bb2b..b145db22370 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 da1332f0015..3e18d179ba0 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 2e3ce59d75d..62838bdb731 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 f3a99927f4a..e2ee37f64b1 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 79c95771d7b..dcd426f2034 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 5c64ce43e5a..7a21ae2e397 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 1c778358bf4..7fd43adb92e 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 1a97c491e93..8eb5e14d983 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 43170703cb5..1af89804c07 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 a32e0cfe53f..119a2647f7f 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 45b8a95d2e7..5f23930c18c 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 fed262386af..589716f540b 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 b0afe62fbb2..29968c29d3e 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 12941f186f8..c6521c188fe 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 ca63f9cfc59..6f335c8eefe 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 1cdc9c98f5d..5f1d7429813 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 609de7cacdf..552e1989993 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 7fa8d26d74d..f37b500bc02 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 eff09cd6a0a..ea49850d5fe 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 7ced110a7d6..542bde0a6bb 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 e6ec1f998e3..36cb9b088f6 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 cc4c2e68839..f82dc9cf846 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 a00ae7ae0b6..5b8f0e54f73 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 c04b181958a..ff205d19cfa 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 2b71b1b8e93..8bddee6318a 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 c66e2aea1b0..c9cee268f79 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 30347a0c2f5..28f15cbadec 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 dfa53254baa..8ec08a91135 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 981ce78cf32..22e67df6e88 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 ea5d203f6b4..b577d544154 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 b9f3fce22d1..12125c878dc 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 7abf56f7726..41c17971d24 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 df54bf2e38d..055181e04d0 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 c6ee8b59679..bd6ede58821 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 e3eab44ad13..c75f3e3d3b3 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 be4972f1bef..5f2b817a919 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 970712dca3c..fe42827d24d 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 cb4b4a33cd4..7be38279284 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 91c8eecf565..133a954ea21 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 c147e0c0395..db5e3440f79 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 156b767eb48..adf346e85b7 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 39739ec870e..9bbabf51b18 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 6c68132f5ed..373e8cf74f9 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 487c2f8676e..3dc491e0895 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 a03e7213deb..e8b23e02774 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 4961b371b92..b31332bea9e 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 5a549a08256..849280bdb1f 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 15a31f62428..8f3e8dab80e 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 0ee1ed5aff6..5bfc431af1e 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 19216ea960b..8495afd0c59 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 3f0018ad629..92de47e74c1 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 f964f045a0b..d39ccc2b749 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 22d23470bc0..00560ab66e5 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 b0a9ccbcd3d..56edfee590e 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 75811940249..0f8b28bdc3c 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 58dc97505ae..288d2694e5b 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 0f611cee982..d53d0560c36 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 ea8a5938557..f0daa7028ef 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 4f2ec3980b3..49dc1c5104f 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 75de0e74c4d..b50609ca7af 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 b34218884f0..83eb9b27ec0 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 78cf8e9295c..5f101ee3fd7 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 983f9a04e58..b29a76f8003 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 65030c2c47d..6b7e4b5e400 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 8fbdd7688e5..e99aedafc08 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 df80a7b1658..896d5711210 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 d62fc7a167e..73e64ba777a 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 f65e369fcf1..f99e4fb0c5b 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 7d165c6f03e..1384f6f2b31 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 8ee95a7c701..1c4ea455d2a 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 67820554d47..a5dd0d8cb0f 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 dc3db5cfd39..8e567e49039 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 ad27d3ad3e2..64dac54dfaf 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 20e6b44fc73..181da422f17 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 f009159a917..744ba126579 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 983f9a04e58..b29a76f8003 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 e7081da9a71..93d9362d7f6 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 8bb67f64108..d8c2eb12dcc 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 3580ea8b24a..25e500aad93 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 3b0745a9c92..36c683177e7 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 de12a55d4fb..b26d0f48e2d 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 a430d7224b9..2cbfbde2b9b 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 8447fedbb60..e50bbadf8e8 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 b9fd87b9f1f..0d05b4192c0 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 c3545dda76d..50a1c3dc701 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 8f8e3d4a932..69ad877d807 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 68fb0551326..6fab0609aa8 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 8141f7101f3..24869e01f5a 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 7d958630852..880259b2197 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 df400126a91..d027d0fbff8 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 8fa8e64f9b7..50ba097c1b8 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 3243736e984..cc24c7f6c37 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 f0c8f61b0d6..517d7679b6b 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 a577dbd09a0..5676159fff9 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 2961c7c4357..4a7e7856087 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 6e41a475106..5d0218d72c9 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 0a3f78d5987..e29b25fd1ca 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 e5955f2126b..8051865c71b 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 34ea49aea3a..19ffbf08e50 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 e3ed6430737..c2a408fb89e 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 43a97f8fba6..74842238662 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 a5014da5eaa..bc4f156ada1 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 1009894e95a..f0036ea9283 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 84963a2c1b3..abd0778e606 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 6aba6ba0df4..7c1d888e1f2 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 4e72238324b..c059eff9640 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 c24de58539b..97154b7fcfa 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 79ecd42053a..80928d26413 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 01a7f3d7167..a2e5b0d9076 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 86d92fd691a..aae04d7c3ad 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 9362830690b..54da0730270 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 2f38eb782d9..73fe92010bb 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 93a853a1929..5164bb795c9 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 f6c32ed4aff..f0c7b251c28 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 cf591da3e3d..60eddd18eb4 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 3a0b1638f10..431c2a2bdf9 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 1642771bfe8..e949f2376b1 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 5ad11f5520b..c5f2a2d5d3e 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 e1dd35719e1..ca18b8feb10 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 026869b4c57..0d16f995cbb 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 e0531787bdb..8ceec0bff7c 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 e9e7c15b371..ee6d05c9d18 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 3233a5c479e..649f5a530c7 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 fff31b535ae..cbfc4f7b110 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 6c753f31e5a..323f02ec632 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 7c849b91292..3c90fc4c203 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 37296b1450c..6fd3b2d83aa 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 3bbb965b7d0..c4af6a147eb 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 e81180fd5c9..6cb4bc197dd 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 11d46bb8c24..b926f10a9d5 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 18684c89372..1dc4320b178 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 6ee2168b4ff..b6f9bff8f2e 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 78f6bdbb20f..4e57bc945da 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 fdc4cf78341..3525c2468b7 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 500d1c5c490..0d149fafee3 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 a1fb75e110a..2b6a6682bca 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 efb46184712..7ccbf9413f2 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 1ee66d7f171..3c8e10f381b 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 a6bcb47182e..ccca819551b 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 fe982ca9a18..c13700f3421 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 5d1bf16d59f..338723b044b 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 7c102071cd5..7c1c8e159e9 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 9a7a3d8b4f2..2e709bd4781 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 ce97c24b44c..bb39a249e23 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 ff4d90bb884..a01003fc3d7 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 1ae083e8067..edfcaffe460 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 b30c23ad4af..09f2c9c595e 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 1cdd5730e6a..229d38eb7d1 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 121a6d39bcd..33848136e46 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 86cc20a14de..338cb4823f2 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 6cad96e7dd8..bc1f281b0dc 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 2ce4637ff3e..dceb1817d02 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 326e18fcf76..f47bd2b0a08 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 983f9a04e58..b29a76f8003 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 42749c22167..3a399196b93 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 e979eff3638..0bd7bb1a7e8 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 e27d87485a1..2c5199f6479 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 2b7ad4db196..0668127bdec 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 b130357518d..3165c072d12 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 17b287fbdef..67c1f102639 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 ba7d5420e03..6d5b9f0155c 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 d560219779f..2115d1d0381 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 9c41796a7e0..0d84fb1e370 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 559090a1dec..59ff89e603f 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 15521f2bffa..d3e2d4b7d93 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 5bea80fea30..e8415d15f88 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 b72006f0cb2..67db9a869c9 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 55c0548d539..59389bd3ee2 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 489bb5cbfdd..2ba49d8494f 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 1aae6a91aa5..d5af3ccb3ad 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 11acf7f1560..560543c586e 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 f90500decec..726be9e1491 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 ab21c95a6fd..496279d7f0b 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 983f9a04e58..b29a76f8003 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 28e8980318d..bd0264c1bc1 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 3a115abc1a2..1619a4fa360 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 2be2591c29d..f020359dea3 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 a1c596c3d52..160dc4c1b8d 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 fd2ee40971c..c5f0d1187c3 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 8af596ae238..04000a6f06e 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 ee190081eff..cc4b2b02804 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 4323c91a22d..fb0d630a830 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 2c3604bcd43..ee5a588ae38 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 facbe33f884..4ba3ea340b5 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 a147e26524a..7fb5cf7f1c9 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 d497ce9c429..c3210c4c68e 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 45edc59ba5c..36ff70e1c21 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 c7b50aedfb0..380fb3da4ff 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 23f42bef4bc..8f8ea1810ed 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 cf1fc962906..c90905297f7 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 59beeae23eb..f536a64e601 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 c87c8a454f1..0ae960062af 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 cde815b6c8e..0817d92ea1b 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 1aeee3928e9..a065f461926 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 9c023e33779..1aa32569397 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 b7adae7fd73..d5331df48ab 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 e190f962c46..e42ccc4d0fb 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 010c1f523bd..334af9e2651 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 c98dada28d7..c75ff8f26a3 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 2af5dbaf5fb..e8562b01520 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 7e83af259c4..f6fdedb2e73 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 2499e1ca68d..628fcc2007f 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 d2cfbd3eb6b..dd11d97e70a 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 aec59060cf3..4606664b16d 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 b495e591de7..c1a31a74493 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 014fefb1e22..079d8828d57 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 45cf2b6e678..9edd4518ab8 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 661200abbcf..c834a24c7ed 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 7834f6a0243..3d2358fb3b6 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 983f9a04e58..b29a76f8003 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 64dcf2bf93c..50ed518f6f5 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 97dd74bb226..c6c38836616 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 b812a08038d..84acc10bfd7 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 cbbb6ffa1fa..d4a6ac6ae2b 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 b3f1ebe3701..21372921b8a 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 ce5c3d095c2..7c0231bd35a 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 b7a75a664c3..ef0fd20c004 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 560eb88168d..345a1830d5f 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 efa9f0b80df..4d9f828e46f 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 3b0aeed383f..9d2a313b832 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 8d8dfd38c86..c6338bd42fd 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 bd180f15d67..f8b85dbec9d 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 d8f31347bfd..653e5729338 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 d3c03aacda1..7583cb09691 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 37fcec0d8dd..e611375bcdc 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 a9f087e5af1..85a4cc95736 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 2cfd81581ca..a295f9ec396 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 a6c0eed7630..47382823127 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 c40dfceca80..e8df75e5cbb 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 4c735675acb..93cfdfc56a0 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 983f9a04e58..b29a76f8003 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 78a6943e611..6c5953e2df1 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 980d11de946..39c35ac7bf9 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 a432cf79f39..c012009d976 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 ee99540c460..d81c93483a2 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 95f7d441606..a049e2a3fd4 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 7ccec713752..4109361c584 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 f9293cacf55..b0274196e2d 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 b036869f1b8..6f5dd71694f 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 daebfb1bafd..34ed0cfa982 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 3b0aeed383f..9d2a313b832 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 6e3faf7c3c8..5d8863649a9 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 26537aacd62..9e00a36a3a6 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 d8f31347bfd..653e5729338 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 1dfaa9e5ec2..ce0870e3e5f 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 3e2176bcd2f..3c02f7af703 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 a9f087e5af1..85a4cc95736 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 3e2c8d1676a..a959a8eb7e3 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 b7d1eaa9fcb..462d290b54d 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 dc0a8cc6a12..6c07ea9c9b6 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 4382d51e285..6cbff50c1da 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 8092374521e..03559e94109 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 b7d1eaa9fcb..462d290b54d 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 d25968beeb4..244010606de 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 6e27ccf6387..f152665505d 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 c84311c5b10..94547c09d60 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 8235426b271..89c9072f7c3 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 cb23f36988b..ada334e049a 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 3f27a73c551..a7c3dd28599 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 08ce9a1c1c1..6bd38472172 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 0f1658fadd6..1eadd6ee259 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 3752d352afd..18628074d18 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 34a60159293..4219a2f0664 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 d67e8c17f72..799993034be 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 689d1d67783..104413a4051 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 a4ec9b0e80c..0acf9d6ba70 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 f1b4fc06ef0..afd15f4bc8f 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 3632922d454..689f6382809 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 d813d253133..3c6065d120c 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 7c93eb9702f..c6c9a6da3e7 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 7aa44eec57f..de460f33fd4 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 6a8dbdbd689..ab3523c6b4f 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 23d374d6f8a..e2b75fc0b4e 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 6731217d876..d56b7d29df0 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 544a46eda9b..a5802d100f9 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 cfdc64740e2..3955611eb50 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 fa13e39d6f8..34c51043202 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 cfb798fac04..0ef933a84d9 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 0d6edf3a036..78a67e3df69 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 a130cb38409..34d70492df7 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 d900e420cd3..98feda98e68 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 e33212ed3c6..310faf86c2b 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 7607c3094dc..e890c8d1fe9 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 b29010853f1..a4504ee8435 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 a3f712e2726..919b5c62eb8 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 4fc5eb4110a..153454592b4 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 ec0df2d930f..be221696c3a 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 728062aa287..379b6e35f16 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 3739c82b2d5..a081e7d42d8 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 ea737065f48..f68cdd4decb 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 b5039d2d239..b0725a8b05b 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 12df3e7e3c5..5d2ff66d67a 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 838ce48564f..a601dd60d01 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 cd718774ec6..35784cdc6d4 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 b44559694cf..3768f23c6a5 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 9bd7327491b..45015507ad4 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 bb41a430d06..1f294e4d519 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 e7b2913f63d..62cd51e2348 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 bcd1ac76dce..a05e1105e68 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 6af103be43b..59c640ffe3f 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 9e3688906b0..34506390a8b 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 7b0306c6292..2441f80ae99 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 798a4361767..45a26e90e47 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 4b4d090f3ac..624723bfda8 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 9fe7b86034d..d8bae10c464 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 f4d10f22b3f..4cd41b2f3a2 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 0c6a9ccdb01..11793794b16 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 bae9002224b..6dc8d8ca136 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 8a84822bc44..ea32963c9b8 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 ffea1ce0138..85a2a87809f 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 0b98b1b8483..a08b7e7c626 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 7ef42b4cd7b..3553c78f291 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 678ab9b59e2..8cda958b259 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 80d5c0216e1..7a11739e0d9 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 abd76b38c50..25affceb7f2 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 ca7a15d8148..06cbbd807cb 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 81ff840dd3c..7f442661bce 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 371b3b061d6..625f83fee17 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 8e14e722c9b..ad7f44f0c88 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 3a0287d50e3..fe4bf5bd830 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 84963a2c1b3..abd0778e606 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 f0a87bb376c..c27e606e187 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 9a319683472..23534c68e94 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 e084d1c396f..804898e8e5a 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 fb541535013..c1b40e458cd 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 5910c6b7149..58a6198cda9 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 05d6167f3ac..2178c246274 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 8474837c981..84404f3a420 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 feb41d9a417..7495e85a542 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 5fe6201e4ca..0d736351ddd 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 0623df6811c..2afba98f8c0 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 513cf705f8e..5e0fda398ed 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 998ba3f3c14..5dda477f6eb 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 f25a3af09b3..2a8f4c48b57 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 2047d92a709..d41bf50b6a4 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 e79cdc46359..5f445b2c8c6 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 001fd9e6e5d..178e1d506ed 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 632202293b2..8543c747ad5 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 a2078799942..550fe24fbf7 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 a05feaf35da..983c35d2b94 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 6fe782ed799..062f3a3cee5 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 eb35bd6adb5..a92de738946 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 7885371d7da..4965436742b 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 66d7df27ae4..ad0432b6bb2 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 e83e136d262..e22cc6fc2b3 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 5e8f3280016..580b1fa873e 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 791798e1807..eaa8dc219de 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 89aaad2f9b3..b1ab9694dab 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 59bf93ad100..2f30ce777ff 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 8d2ea9f8a8c..82a7fb65319 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 330bd84512c..a19669c38c9 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 9786c95877d..c88db148ada 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 d116c1319e3..5eda3cecdbf 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 050dcf80844..9da9ebd3ef5 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 a1a81900784..7d9adce10d4 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 ec5d26c8bd0..70d2909f20b 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 32ab9761b22..413a094e8e4 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 f8887ea4aad..a8d8e89ceea 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 4e2cd510c06..0168732c9b5 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 5ebc3da408c..855378a502f 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 c9e036cab34..df57fe26b1a 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 60b9de3668e..74165c514fc 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 6997c4cc6ac..977d73f48ec 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 a3044f64e90..28e3aa211fe 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 85a63d94eb5..c1b93320ded 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 f4b00e2659b..e51d5d7c94f 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 83a13511fcb..abbead1d4ea 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 5cbf00a7851..a2ffb86c6bb 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 8a9a5f4dd01..233319c4bd1 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 aee34ed34ac..c1b3207b147 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 983f9a04e58..b29a76f8003 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 d4a77901677..f965db67e6e 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 5b1269e5b6c..485b5cb1586 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 73530d2f302..5ad1cc19450 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 5b542881e03..9b742d20de1 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 e483a9c3c0c..dcc7489e752 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 4d90d50cee0..4e8fa7cefa1 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 94db851dad8..32d8aaa8629 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 0aa0295739d..4a6984b586b 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 5fed68a4ea3..ba72f70b95c 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 559090a1dec..59ff89e603f 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 ec76e801388..d1ca24c9914 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 ed777afe61e..e5068cb6ac9 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 150140d81ab..63188ba225e 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 cd6bccc85a5..f674cfac287 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 5467103171d..0b53b845ece 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 1aae6a91aa5..d5af3ccb3ad 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 9e572b5c295..7ac98f58502 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 0fdd651d8f6..b2e6d8b0d68 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 bb38d04089d..74c844d1ba1 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 983f9a04e58..b29a76f8003 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 adbf815045c..952b90f7ea0 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 481e734cdfa..579c076e945 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 51c77bf485b..16a8fb3d3cb 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 9c02f88f5f7..975e59514e7 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 f3b8f096aaa..8f84e40f3d1 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 485df62c2d9..4c20655acb0 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 aa8a93e54be..62eb2fe83fc 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 e43caa77b58..17d86bbd5a7 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 cd0be71d838..bff6a3f3a52 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 c6ee8b59679..bd6ede58821 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 0835eae2788..16cbc275971 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 620c000a03f..277e64c5864 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 650fc7feed9..8dd16e7cbb3 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 ba1968736bc..4f7cfa06303 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 61a7bf35696..8afba3a7c6b 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 a50f207aaa4..ccceed30739 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 3884343668f..78dcfbaf446 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 594f84bdbae..f72762af271 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 34a7377c217..ecfdfb2807d 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 487c2f8676e..3dc491e0895 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 949acd64349..a942a554d64 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 a0445246e54..2ae843e274c 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 e6fbf3edd30..b4dc8822abf 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 b46dbb18d07..fa772914d45 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 d5034992c54..7fa323d0435 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 2770f28d019..130072ffaa6 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 0367d9e6ef9..4418666743a 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 e740248f253..af7c39eab22 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 e0a8fa850c1..b41e1cb2ee2 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 8b0e39b5f87..fe660e3fa5c 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 90547f94811..d5213262a3d 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 965271a0646..d996d37674c 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 aa12cfca738..9667e323831 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 c21e171941b..f6db014da75 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 55113c70dad..536358771e8 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 ba586fd334a..847def6b82a 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 304bc0c1017..eda27206611 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 914b417288c..5376a1426f0 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 ad27d3ad3e2..64dac54dfaf 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 0119c5dff94..14255cd4f16 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 3bcdcf9222d..bc57ab6ea8c 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 983f9a04e58..b29a76f8003 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 34facbaac62..b76736cf949 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 5ca4464998e..8f056905ad2 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 4f1a2196f30..2fe7ac4cabb 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 10174afeb6f..0163b60c91b 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 774cb6d5242..5e485830732 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 b9629b6daf4..a7070907c0e 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 c8f17735c85..fd00213d835 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 990ff2b9442..e57aecd252a 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 73d70e10a2c..f02e1ac819d 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 4ca11d98821..8cd95cefa3a 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 5912f433b1a..849e511a0d2 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 fce4f023579..e7126d6df76 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 a6c0eed7630..47382823127 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 6c0c9bbdb2c..a7179b2295b 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 122e606bdd3..0c1ba5d914c 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 983f9a04e58..b29a76f8003 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 c2aadc151c3..66034a306dc 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 9bb8d6ec15d..0e1158c6d29 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 a0e31c36085..8938d0f61e8 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 52ccc003994..0485545a44f 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 0de77110eed..dd0865244c9 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 346b6e65dfb..f0c2ac34ddb 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 50a8c7ff98c..a39d7947598 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 77ccf67cf6a..ea27c4b3c02 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 0a0d42d59dd..f2da97ed1b4 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 b7d1eaa9fcb..462d290b54d 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 3605572890f..9e252cace50 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 f6cbc598392..284ce684d78 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 f28c3c4400d..45bbe1f3f5a 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 b7d1eaa9fcb..462d290b54d 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 5cdbc09981a..467b7064a40 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 a3dcf7de19a..ea038552463 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 8d89ed43b92..5364f069d04 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 7d1e7b3dee2..8baa4429cb4 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 3eb7e8c70c2..e9376342a93 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 0cd0b782c81..bd3fdbb23c8 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 49797c98387..df4db8111d1 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 7ce84ff074b..11a8023eabf 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 a4fc8cdd40f..8b744dd4730 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 584ea1bf72f..3b7be8ca16f 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 06cb9d61f0a..d91a48ad024 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 a8409d44153..14c5cefa888 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 1182263d569..381dfd1d0d4 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 4960619ec50..52426a2cded 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 065f9e3d260..809e950bc24 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 3d75e617db8..59e59c97b3e 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 4df58949452..621fe4aeffa 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 ff85609cde2..440e69f4025 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 1fcc9b7ec50..deff99b68a7 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 fb82b0af8d5..b5a727aae86 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 15af4c56a9c..230294e302a 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 9c734b0c6a3..2458b7e6af4 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 23e73984eba..4bc65eabd73 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 bf8aa528764..85a4db840a3 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 1e1f9f1a925..5b76caface2 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 63f68f7cacb..de85fb2db43 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 81c5dfe8baf..43e216b9773 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 801f392245d..11dd060f5de 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 0b2bf6d04ff..6089d9671a8 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 ad9153df481..464e08596fa 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 7c9d8312ce8..36794c7f5c7 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 c938e355c4d..4364d25db58 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 88747de24f2..451148243b3 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 0398fb9a97d..201e0adf8c6 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 7543e2e3afb..b0bae2e3b59 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 4a75c91929e..665b75d64ed 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 c2fcbcb96fc..124d074ed4e 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 6fbda555b73..db62178bb83 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 655af2a40cf..4f2dbe965f5 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 069834617d3..b6340665006 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 2293e698c15..f826c8091da 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 b2dd891e9d8..67d2b591c3a 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 bce613f760e..c7bc649968a 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 08ef0f1ae61..249840e4f96 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 495927bbdb6..4a6e98a051e 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 670b293b952..553b48f00c4 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 d90e6689b08..78561d9fc17 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 af2872c3fb9..f5cff0e3cea 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 f56b2a51f82..440fa743a6d 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 94c501db714..c71cac0c848 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 7745097a821..bdab4410ec1 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 5e273c2bf12..7df9c85afd1 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 2cb01c0ae3b..38fc49502e9 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 806ffccc406..26293750631 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 50b838aa1a4..f3b82b9f022 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 7dd31601411..774d7aab141 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 fed45d3b542..74906662c06 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 1a02fe93c75..0251671f3a3 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 9996d5695ad..7539c411416 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 67112495ab6..ec05e70771a 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 9fcdc8fae19..3e7a03864b7 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 3a41d18a499..1dbcb1e03ad 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 8fda6643944..cb450b01bcc 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 6b3d8adfc61..f69816be97a 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 79c67a8e79a..1a918a25624 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 a056af3ae08..8c9631ebf49 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 2a3a2ce81de..5b2ae23c671 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 d1855c72d59..910c5da3b50 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 84963a2c1b3..abd0778e606 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 95d49ff775b..f67de20befc 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 50b4cf97c5a..9b828c8de47 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 b54d0a8058e..14d878957a5 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 2c610b27d93..cd13f2b5bb7 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 c4a96a3bd5e..5ba77e2701d 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 aa442c77b87..965bf130cee 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 3c4123e283f..a3845c220f7 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 6c659632a27..a5330cb7eb2 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 0a5c7941491..648f015658d 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 fce86cc37d3..706c73f3d50 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 8ef0b34cb75..770dbef1755 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 b96ba565551..24de54e880b 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 1985e080cc8..33b8883d6c0 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 7875e0744be..ac6165337ef 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 e431e525bec..6eb6f8037c5 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 ee049cbd197..d8cc5d7f0c4 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 e5cb678ef7b..7067d32fa95 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 11d6953649b..3c9d20f9876 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 e6adb4c325b..393c9185f11 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 04ab3199b90..2ffd011e33f 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 bdd5b52e526..217aacfaf26 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 f30a39bf775..69b9cfe1ee9 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 feb05b266cd..1e9cb4a2c91 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 2b3a7aaebe9..cf9b0127f9d 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 b69fdb9751d..7f6107dd29c 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 d3405f6f90a..b554c7b2b2e 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 2079a1c3876..e869dcb052f 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 df0268c9e99..787bdadcff8 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 5364a62ae3b..37c21e31dbb 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 26fcd638726..c5cf639c72e 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 d816084264f..6ea5a62cbad 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 8c306215338..591941297e7 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 c56a8cd5264..1de100f5385 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 309185d282b..d7db00a4677 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 d3ae6c516f5..7195272501b 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 b908a9493dc..19322872fe1 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 22f635e7582..4c2cc0d9d85 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 f76bffc76d7..1040f8a2d55 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 2c4c5e6567b..da4edb33f7a 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 4b4ee7ba937..c1d78403dfd 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 949901c43d1..8d3f9c475e2 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 32739a520ff..8f2f9fcc914 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 58c289d67d1..e3d459a0e41 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 7fd8e1824d3..85bc0881441 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 30126ea31fb..84562071c6a 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 928b76151e1..5b042c6a251 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 930aa5f5f31..daa4a161fe1 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 e4e589ebf4e..6acc87fe977 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 bbba41592f4..a6f77791c0a 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 983f9a04e58..b29a76f8003 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 c2d3585d73e..842f7b5e755 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 568cd364bd4..fdee249017d 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 073e88744e9..f0b735d661a 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 a53dcfd6015..85fb2bfa95d 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 c62b92684db..5cc2a9f54b2 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 c182f9a94c1..5af9de25414 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 878250f7c4e..2ee3ea74500 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 083e546ea69..ede4d46d41a 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 d02eeabc7f5..81548da418a 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 559090a1dec..59ff89e603f 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 1171b8d271f..703c64fe467 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 744eb789c39..eaaaae28703 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 ca213087432..a4a45344c92 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 7ef9776ffc8..ce51441ec63 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 17f8d151953..a03e68ec2f3 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 1aae6a91aa5..d5af3ccb3ad 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 7d25603e285..e9fc796453e 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 0348d814c6d..c69806d6e16 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 4d26f7909ff..2afaaa14f00 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 983f9a04e58..b29a76f8003 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 5cdc8228e16..fb2dc01949f 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 b14c67f6213..37ccf798010 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 0d59a59e104..3f436662b03 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 3599047d49b..ee9ea870fcc 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 e675d03ade0..75896e38ce2 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 1d31c21b8b5..7d481e4c71e 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 97ae2550ffd..7e5eeff641b 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 16bcb4bb064..44614fe166d 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 6768b94da51..fcc42a91770 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 0650ad574bd..230a907cd74 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 54ed8cd3b1a..fe4869709ee 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 e1f442fd657..1691cc9a263 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 744fe1c76a0..55f611bc235 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 cd538b466fa..fa7ba61244a 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 8d373d56c69..f59351ad5dc 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 6b6a4728d95..90c49a2c631 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 a59ac2c939e..cfdd675657d 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 e65320a5762..14469c5d70e 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 8e5814d029f..b5c7bfc49ac 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 af77dbcd1db..75b7f339898 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 57ff6d7112c..17b61ba415e 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 983f9a04e58..b29a76f8003 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 bca9ea117b1..c05a17ea866 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 c8b1479a1c5..f6bc019d250 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 31067190940..36b70895fbf 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 46972c6d7b9..edb2a34208f 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 ce940b730b5..167d1edc7ea 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 cc970a7b86f..7c0a90d04a1 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 16d81388bd8..e30991ee77b 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 a415e218422..5f620659c45 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 f8a51cf5d7b..8baada3524d 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 c6ee8b59679..bd6ede58821 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 a25814be134..8173b16af1f 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 c08c292162c..aa0047e2877 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 9d038b07e28..ef5e5353574 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 9d8739dce60..856c3eef74d 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 888a250b301..bb88ccf815c 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 0375fe8add9..fa29fb61d77 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 eaa8b7c44fb..85463fad04f 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 106a50ed61d..19c36b379bc 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 85ec7879a52..7fad5e915f3 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 487c2f8676e..3dc491e0895 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 8b0e85a243a..05b7794adb7 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 b2ed8e0489e..77fe51c4f5a 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 10d6bf49c9c..e501b3817cc 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 7199162a99b..413fc3385f8 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 e8357b95a4b..dce8d7e5fa2 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 3e6c6c7f847..b600e5e528c 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 15faf7ca93f..f67d7195d32 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 8615e65bec9..d4447884730 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 95c9a3d3b07..6690d5f2661 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 4d4e06f5cb8..986a2d2af47 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 5ffd95b8e30..fbe7db38330 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 d4b10d04789..fb8e6dd7d14 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 c5327e37107..a493d16f8e9 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 404c7e07d83..dec54b59248 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 9c548ca5e97..733aa8ef518 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 c35430443cf..4e1c339097d 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 b1051b8005c..768c5ec6c32 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 576ffe99694..1eb9239d0c2 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 ad27d3ad3e2..64dac54dfaf 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 66f3160fcd1..4e03235e5aa 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 f98edde90e2..d4e5aa2ef65 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 983f9a04e58..b29a76f8003 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 c9817b4100d..054739dd894 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 a370fde0bde..5a470f583a6 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 be7ec3591c3..bcad4573121 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 51e17f92cb6..36f6aca94d6 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 074a3e6ad6b..549d5f7e984 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 375a45ca7e1..41d69a6342d 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 4bedfff0c10..701e9ef274a 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 64f8433bc7b..933b44ffde1 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 a3953564ed7..bb643b1bbb2 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 cc28ee67fea..13c597bfd2a 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 0c4b28138fd..c847397a341 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 60b9f21e6cb..4bfc080c8bf 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 a0debfc1c96..cf2330b7e34 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 594eca548b4..e63274864f6 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 4ca11d98821..8cd95cefa3a 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 bba82a44821..6893e54612d 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 0e7ffcd0fd3..1822751dc39 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 a6c0eed7630..47382823127 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 926d100febf..43f59f22900 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 b82f5b454fe..62f00997f7d 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 983f9a04e58..b29a76f8003 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 5adfec84aa1..24b3e5823eb 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 d3998e1475e..e685a6d1a79 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 ddcb1cdaf29..805cc59a069 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 1267012a853..89bea3fb870 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 dcfe222b167..fa8fe5226c7 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 8f88604a08c..47cad6e198a 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 fd76b5d5437..ee6545eceff 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 c2c45eab31a..8e49cb4e5d9 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 bd4bbc596b0..c868a6d1fc2 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 b7d1eaa9fcb..462d290b54d 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 448d94fdf28..e262c8fec60 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 2706577768b..4b1f8e093a1 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 8500104dd82..7596bb7dbbd 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 b7d1eaa9fcb..462d290b54d 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 cb79c4e967f..01dbf54d40d 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 e46d2ee4bee..eac11371de1 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 aec1ef1198b..5790bd06990 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 79272436ae9..70d508b26c9 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 968fe564e2c..3ff0a4a7dda 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 4a373aae2f7..fcf1253397b 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 38e83f4066d..89eb9ad6d32 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 1a5c9483af1..504cc55064f 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 b8ec63a531f..fe878eacefa 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 7e5ad16fb00..c2f72fef2b0 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 8fa7f82b219..4ea49218c2a 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 26ba3000d60..db2e7606261 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 b08efb5705a..53c00831047 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 70914d05c55..5530e71b668 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 e4df546f2fe..d529dff5db2 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 470e10ff58b..6ab41fa82ba 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 125d9b3e749..366425d6f34 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 011b43e641a..09d63ef1dea 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 bd41fb56610..da4171b2859 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 bc9a637d2ed..4ce0160d481 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 42a5e13dbf1..be6a018eefa 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 0095d5d8fa9..caeb7d5041b 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 b8c5a78fc55..0199e6fca30 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 dbbcda45fd9..c9c95290d34 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 28ccd9e480e..e9f5a588f35 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 8b9da9ea863..94873f1ffa5 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 2802f86d0ab..fd5881357a2 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 90db168ee07..db29208067a 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 2cefe681ed5..d28a038d1fb 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 5b867d1db00..de076911ac9 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 737cc3ccc51..220805c7497 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 6334bf65ef7..16982ed9675 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 c3544f53f6d..3fa708b85dd 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 63d9997ba68..df8b1da36ed 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 be70659c251..7d4d08cddb0 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 720e9f98ce2..b15fdf693c4 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 9226a642ea4..2d69fdbaf6d 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 b2340ade385..1d1f259506d 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 d36c5b3f447..faf02f0f6df 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 c7d0a345833..7e174fc79ae 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 44665148fff..62dd850a916 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 847bb34e2df..cb5aac9d28d 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 fdbe0aa5c24..6efe97cd945 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 4e43bc2d430..d5c1394f6f2 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 2e6eb192a3f..ff09c728b0c 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 634aac3569b..0f3c39582af 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 c04e414e4e1..1ce831d4b83 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 bbc219f3040..cf173b4d6a5 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 656afd5f6ac..1e8cbbb25e6 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 80a2c1ead8c..4ff1ecb18e1 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 954bfa69f87..2ce32557181 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 6e08694e5a9..73861ab60d6 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 6c3426313ee..6de97d346fe 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 67de5030d0a..42827f1d1e2 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 a8393640305..a585aac95b2 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 bd0c6ed5b61..e52c9bcc640 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 296d3c56303..b5484bff73f 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 7f1b2716c31..f451f8551b1 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 c6ee8b59679..bd6ede58821 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 90bd15fc2b1..ad676f76b9f 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 68a205a02e6..291d7776c90 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 f335219b971..5067127582d 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 8e8ea94a61f..1037538a794 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 4fa9517db90..4dd6fe56461 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 8930e8627d7..4133b03ae63 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 b79b24df033..a2252efa95b 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 e6b1dc6ab86..cd1561f6802 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 3e62c3f977b..10adc0a7e97 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 487c2f8676e..3dc491e0895 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 f60ca7a3fdf..d49947711b1 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 7d39e7e48f6..d377d1c2688 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 a0b8904360d..2738ae2bba4 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 3c61be6ebf2..392f30317cb 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 ecd666c229c..ae6fbb8efb3 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 b56f2f35843..cde05cebe4c 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 b23e767466f..4d324fd5772 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 d3e09a94a8a..cc852d5b89c 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 bee8eb002ba..dfa82b32d56 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 e7c578a1668..ffa1643f483 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 eb286373940..77f87ef957d 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 f7cab2c9503..5b6a133c6d2 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 481acec0833..269f6b1b877 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 777202dac62..bbc058439c7 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 e9065a94e5b..9625906f26e 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 603f8b038d7..db2da3110d7 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 822c80c59b4..79208e8fb3e 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 0f8b457f84e..9b3258f30e3 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 487c2f8676e..3dc491e0895 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 baddd1252fd..81697aca7dc 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 7ca2f56a060..afdd3d0a162 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 d8db490147b..4acb790f6e9 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 d2abfa9dd97..9b9bb609203 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 929cd431e18..d0af76220c9 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 13af6771e07..138b6473857 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 f8713dc7cb3..083163fa998 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 e335de9973c..7dfbcf1a2e7 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 97f7b7382fa..e7ceb3a3b97 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 3086ee58cd6..a2a2ba6d236 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 a5ffb8d2866..5d4af5311db 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 7cc5d4ba777..2d1634ee483 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 607800001e6..0b20fe4762e 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 7d79d95844f..697dbe0ffbc 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 75702c481e9..08741a13a57 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 e45a0c09c16..5627e9e2d56 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 564d564ff28..ecbf26eaf89 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 1436d068f06..54ab8369134 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 049134a716d..ea80a8a0f0d 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 9e0b45cb745..78ebcd252da 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 ad27d3ad3e2..64dac54dfaf 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 95ebba7f5ce..3ad22013152 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 4d1711fa808..35be2b68306 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 983f9a04e58..b29a76f8003 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 7ba3447ebce..729902b847a 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 f091b18b4a1..f161a742d4a 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 bb06b9ea2e4..2586b708728 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 12c7d21e5cd..f2861895d4b 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 99b3d827e22..8cfb4b7f5af 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 4885ec8af00..2c28a435556 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 23a1348ad3b..81c386490db 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 f9f78706294..8185e39e2db 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 0d5c3f8f445..6575be22bfa 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 e04f18cc550..a7391021720 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 fbda823fd51..a193fe4b2cc 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 0d8e75843de..9de6861e104 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 34f0f483cec..f4816edd7e0 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 6e1d2a2fa2b..30d15cbdac2 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 6adff68d910..0ec4949e44a 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 df64c293f4e..498d497dbee 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 d2eb2afe7c4..afbabdf0361 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 88126c233a4..f0e429a0efe 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 0613df37d72..6bbcd2a2fd7 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 2e3dd48567b..0f854124315 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 d8214e5693f..e58df59c8d9 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 7012c43eb38..bb602fb66b1 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 c1ebc8e1cde..f4ae8385575 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 c8f6effec0a..50fc5bd75d7 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 84963a2c1b3..abd0778e606 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 fa9f5783b21..3162e15bdf9 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 1da5ce7de52..c4d9c298c2c 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 db62d8b4236..4713bf97bbb 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 7d546f422bd..4ad9b4c929e 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 e605ed8825d..fb05e403ed5 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 0e22588ca37..ce251c1baa9 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 2741afb7659..a513c4a081e 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 e36b8704a50..540dcce27d8 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 5b104b90a66..53afc61b589 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 1db940d8349..46b982bd10c 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 f692ef4c9d3..4161e851376 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 230aa641fe0..92a47e884d4 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 422cd26db59..05518f6b407 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 aaece5240f0..9ed684576b5 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 d7be46bd1bc..364be31d9e1 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 6283fafe5b9..b915359606a 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 c52591689c6..6e4581888f6 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 f89842776f7..cb55fc1ed5d 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 5f2d68ec6a2..f1d503afe54 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 63d79127e72..308f72b384c 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 445f4d68299..8288900568c 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 f7209bcc24d..1518c57d2b3 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 16b55ff9d88..e56feed3658 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 e5aecba7266..fdac1664d47 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 b8477594450..ae9089fde5c 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 197c5cc571c..121750a0a51 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 445c5a27b24..5c168ad0e23 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 be916f41a1f..db40a002727 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 1cec6e94eb1..86d53f8d0e3 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 797ca3d141b..eeb644dd848 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 c0554e8a2b1..5c9d6f7ae80 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 903047f6985..fb700a32d45 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 e767a51254b..67576169841 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 18b78bc9300..87b95833b39 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 34a95ece975..6e2c3eae908 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 b52c764e663..bcea3a81333 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 2ffed910548..fb3b71364e6 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 78abd1be59d..31390896327 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 dfebf55f409..454bae081b4 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 5b62b4f0b29..64e67d754d5 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 7c843601add..31d8635f4ba 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 b6785a4d3a9..cd019f64792 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 87db6a87590..75ebf6f6bde 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 a7b622b57bf..91b32c7f393 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 a38099956ac..42968cd668d 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 4c0182ae494..12d8787fc5c 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 a6183bd8cb5..0b079a81d9b 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 d9cd5245fd3..ede2ef1b129 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 386ff0d3807..45cbeb9dddd 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 983f9a04e58..b29a76f8003 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 d443183a5be..a7de6c806dd 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 6fed1a7824f..bec7835f899 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 299c09df741..afd1e097dd4 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 009eacd5532..2bd43e0c7f8 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 04e6a0eec09..e144a54d0f1 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 7c0750eb39d..c6973abae35 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 cc25281e4d0..91155c41e5b 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 8bbb85255a1..0af22d79497 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 2c26c2dd78f..d5e3b11cc12 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 559090a1dec..59ff89e603f 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 57d8ad3b089..8fd12e001a2 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 9e59dced6cc..e53bfca9090 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 1cdad308dba..b765848786b 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 1fabf12e9ef..4f057084dc1 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 884c5d4acbb..4a5b87bc7e0 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 1aae6a91aa5..d5af3ccb3ad 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 5d21f53fa47..9fa0ce765bc 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 1abdac5d20f..520c8848796 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 7740a24f936..a53cd89287c 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 983f9a04e58..b29a76f8003 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 01f4bbf3b6f..d8ff123de84 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 cc0616510f0..98cf6f85f47 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 85803587af2..bdb03d77faf 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 6ddc7cef5e4..ae3051b129b 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 f8e6e0bf8eb..8d1e8edef5c 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 7a9f9b5a26a..5c9f41cc499 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 13d933911e1..c7abbc670b5 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 715af89e21d..68ff4d149e1 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 2e2036b9e0f..4f0a92c9a4e 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 a2b9e1ae50c..ca6d32f725b 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 843330469ad..d30dc08ae13 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 7acea6a22e9..0246ce97f0f 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 e191ed688ae..37fa36a5c81 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 fd5cce9896d..8ee65bc7d86 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 e190f962c46..e42ccc4d0fb 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 52bf7209a5a..94bdb027242 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 fc5488453b9..ddf0152b05d 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 afe0c597b6e..4eb2b5f8123 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 8a8763ab18a..cbcbdf0787e 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 c1fe3284506..39b128224ff 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 891ad6586ae..b3caf4e6c3d 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 0a37785fe01..d7fd14bb93d 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 708ee5a3237..507a427c86d 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 97d803323d3..83f482267f8 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 ef876769108..f78c6a26b43 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 4b7dc624543..8c8ee2f6453 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 caf94f84f91..61341b68fbe 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 487c2f8676e..3dc491e0895 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 37ae1a43364..1cd640e03e7 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 fd77cab3718..0c54f0509a9 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 c8ba28e6cea..755cef78f31 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 f7b81cae63c..aea5011fa47 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 5123b343d2c..3de26d1d75a 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 263608b4cb6..4a19f2cf691 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 c8bbfa24bf0..3da1f264bc5 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 2dddd9c2eed..632c28f1eab 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 6ab4657ec2d..b5c08653e6d 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 130257818b2..7d5ee5c3e8e 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 2f06a6f7b0e..8e2351902c8 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 8e56130ee8d..9f2e1503621 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 2f452ad98c7..f394bde1e91 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 188b0ae2da0..4fe03864169 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 6665931eb3f..dd33512646b 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 d66f62842b8..f37574c8647 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 ed8c7f99159..097843e0856 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 0f205078817..d50644ea73b 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 fce05faf911..7b4da4ccadf 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 d02e2f9bfb4..975271672e8 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 b095adbdb9c..51ddb64d5e8 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 b21c0850b18..7b2b4d7b86a 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 b5f221b2af8..5cb4bfb5391 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 ada8813be22..1fd9aa4a8f8 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 487c2f8676e..3dc491e0895 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 bb2bedf1814..c8129f583ae 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 a0ed0ccb793..875e2418575 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 5d7765f18ab..108b7443df2 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 5c796307227..7a7f24b83fd 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 f1e7f7b06cb..bb67988ac6d 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 4aa154ed127..220e1337d1d 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 f50fb8d0777..296e66496e0 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 2b088b57e06..e98be0b5687 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 4274a380a37..8024c11fe0e 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 1602cbf797f..96a1cfb9497 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 f63ad2b5588..8175b351135 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 4b7dd89d4a5..fb8c2f7aaa0 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 37b1002cc4e..44f8da48f43 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 41e0ba85d77..049718338c6 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 79dddab9c7f..98134866ae4 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 c9fa845ff87..94c37f7c04d 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 820ef39d424..fdd7ba93bc3 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 8f3a40df645..38664c1667d 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 a9f087e5af1..85a4cc95736 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 5089205ea85..d9dfb54208b 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 a6c0eed7630..47382823127 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 b7e615cfeec..130799faa63 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 8f8cec7f6b7..9db36da4e45 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 487c2f8676e..3dc491e0895 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 a41dcffa299..aebca2048e6 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 453b0432531..5f856eab1ba 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 c91ba6fc2c8..44fd3717c8b 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 212a684cc5f..4d058884aac 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 b51f6fe39d5..68f10ddc689 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 94f77c6d28c..ac5f3fbd2be 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 d47e60f6c10..2bf5a90441d 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 2aa75ffa788..7467e5e53c4 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 96844a1cf44..b1c9d594421 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 e69fea923e1..1b8018da5e9 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 83e706a6d70..2c822a4ba37 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 3e2916f4ae6..65e56d52f69 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 55b2d24e75d..ee7e8bad422 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 fb00ea84787..d3569e47ed8 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 0de22cb7bfa..021a20976a2 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 946220bac72..d29e985317c 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 642361804ca..0c965f1914e 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 6f09aa36bd1..86d34875203 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 4f869feaed3..8bd48751b68 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 f9b2026fb2f..3fc7260fa83 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 e454023163d..fe393edeac3 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 bfe18bbda48..cc57c673c29 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 e56bc098b00..0d1c67fb458 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 ce4b3f203bf..9d8611cc449 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 ecd1dd6a37c..257e03c20b7 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 0de35968d3f..c52890c3de2 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 eb330f7564a..cd3e890e31e 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 ee1ba0f3120..3ed6234700d 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 229fdce0b25..a8f95845bc7 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 d468124fa52..1b6d2f086f3 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 d4303b0fb04..91045fc68d3 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 805f42f7939..d405bd56c7f 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 a806a490589..4e9f5940420 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 1e051b5c7d8..5e22e209113 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 81d167166a6..8af5c6a79c1 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 205d2432b8c..dcb75c263b2 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 8f8b95453ed..2a86a317e4b 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 d4903e46362..3047131b8e4 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 b23db50bbf2..a99d6f966e1 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 140a29c88aa..8ce2c4c9912 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 df31504b928..c61c741dccc 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 f2ec3448982..a108d6262f7 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 adfc1380676..9dedb9bf61f 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 73e09424828..4b276cdc4bf 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 b778eb62e0c..2b9125ca327 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 9c9452ce924..475cd556856 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 3eea736a52b..60e3c4035fb 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 1284e51b085..aebea387b05 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 7ab20d743ef..2ec893fb1b8 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 f42fbc7a92f..c77183043cb 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 e5575632f7e..5df2909b88b 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 09cdf9dbad5..ed6da8bc5b6 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 9fbba182926..538b7034616 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 3b8f1df417d..8ed13ab57a8 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 ea01998f58b..a8519eafa4a 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 c02f75357f2..e498421fc14 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 29e8b848a00..9f190cf4b12 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 fae4d527c9b..293b7e8959d 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 74b1f08e76a..f95056dd144 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 23b5197a427..b0bba7f9609 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 92c4067cb41..a63f2fdc69c 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 4b66aea195c..d98dd530c95 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 c6ee8b59679..bd6ede58821 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 610815f0315..d4fec389bfe 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 a5ad4b4a0fa..de422b7732c 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 9b075ea55eb..0477c15a237 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 582f9814189..2dad0f57d48 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 7674e229f6e..0219208064a 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 9d02b6d1700..8dfb806d979 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 8f485eb78fd..52caafd395e 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 490a3605e6d..f9c6c413b3d 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 bf91c772682..3551ba71c73 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 487c2f8676e..3dc491e0895 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 216851ea98b..416342a6f21 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 5ee3e5ca759..573ad636efc 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 61dfba3c1e7..adcbc0452c9 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 58a132c923f..74ac9240aa7 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 4cfd9bc318a..b5cacbfdf37 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 8d2fbb35c8d..19d9685969f 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 bc58e55e5d8..ef6a2f66b33 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 ee5d7cf8585..485653b35dc 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 62fd27c78fb..7bcbcc59b37 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 3a3a98e4d92..52009d92481 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 c2890fe9b4b..2c3eb8b2ebb 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 e2aae20e544..b99b9206e2e 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 e23ad408fc4..8032e18955c 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 8d88d3c1085..42d255bbe79 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 f64f8dfeed1..d2675da8c81 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 fe48df2c5b4..da42930a86f 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 b259a84d3e3..b7e65d33286 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 a2d7e50fcb9..fc55c482812 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 ad27d3ad3e2..64dac54dfaf 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 e8534f56e1e..c2876ad8035 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 8d156380c81..3221b428dd5 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 983f9a04e58..b29a76f8003 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 2696eb652a1..c2db30a3cf7 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 8157c0ef7d8..c3c70eab8c3 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 df4d11807bf..06c9f9b99db 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 45ea5f22073..dac191ae61b 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 0703f95a46c..be84d603d35 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 e3c31735cb6..bd417573d5f 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 8d6cafc2869..b8ceb550c3b 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 eb2ead66cbc..3bdff74bc0b 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 2e4979dfd2e..bd5e9e7fb5b 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 a6c0eed7630..47382823127 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 0c54096930c..b70a287af06 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 02bc8c921f6..0121e4058a7 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 90a3d4d166b..f07d13e69b3 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 76d5d5d91f6..6e0b681641d 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 80c3f00a183..8355d2c1f71 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 109d43a7d52..74e166d0e62 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 862991d7e91..b54dcf164bd 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 17176c77a17..3c245efed5b 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 e4fa1825566..2b32d98b183 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 0f01b273e7e..52451ef293a 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 86dad78e346..7b2a9f24518 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 a55efc9276c..5ad64ed4051 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 e2017eecddd..89c34992bc7 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 f3cd8624a58..8268cc63115 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 8ba5cf55975..aba5dd493e4 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 66d76dcac7d..f35ba6c30d6 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 5888c0041a2..ce12fe3006e 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 a0f43ffe863..de003b4391b 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 fd8d9bb99d5..f7c39d36cd9 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 90fe36dc527..fdd5dff7347 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 01be5fca950..24b2aae6afc 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 8e9035b5088..5983b59d544 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 9342efd4931..48fee26c35c 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 16339b86b7b..4f2b4cd6717 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 d79b7c77a9a..b5a38a38062 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 77227c33eb0..3cf93496fdb 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 9bebaaaa0c2..f1436aa0e3a 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 c2baecca40e..ae4f401ff8d 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 a2a7e1d7159..0455dfa15e0 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 fc3b13122c8..e34c59104c6 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 a37de703135..5c22e8781db 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 601ce8f1b78..e43a432615e 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 4bc253380fd..b7209b9fba0 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 534a5dc8106..e9ed3718991 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 90ad0a757f2..8a904b7ddd4 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 d23a941cd25..9225dfc5a19 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 e2312c03a84..11541c453ab 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 90bc36a46d8..7c1428507d7 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 f5d6c14f102..3635817c97b 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 983f9a04e58..b29a76f8003 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 b825f2272ac..4419ea667fb 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 2f73188c284..b3535d5800c 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 92c21001fba..969975c6634 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 2f7b0ccb78a..f887a3cd9b7 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 f1566275910..1180e7e7ba4 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 9f64971dd7b..e05ed508149 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 07ea1edc781..81c495e5ddf 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 01822ce5d87..6aab9ab9a4b 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 6bf4e46a634..30bbd29680e 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 e2312c03a84..11541c453ab 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 c150f3d5faf..08e7fd5ee0b 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 5d87a0dcea0..f02aa142258 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 67de5030d0a..42827f1d1e2 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 1112db9257a..3fa713d6000 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 1c89a2da3ba..f3b78a16d1a 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 5e771be80c0..1ae978febd0 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 b77921c0ff7..25abc877d3e 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 b2ca780c729..ba2d397e89f 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 d81d4d57382..a8787291321 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 5ed1d865699..536fc4f4e4b 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 5e304a40c33..ce8a54d01eb 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 d144f149262..3bd624a02da 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 ab0db6fddbb..5f40702d7c4 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 60110e6c670..5e41cc364b9 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 00e2ef40eb5..7d659618bf3 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 6d07e6323a1..179cd47afca 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 cfc2e2cadd3..71484233468 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 554168e7782..147a295cdd9 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 decdabfbe1b..95253e3fe64 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 c26d5196a75..c800689b065 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 aab9a6e089d..66381875efa 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 d796b052bcf..7a3906c8c8c 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 5509e221b34..488162e5edb 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 8057a292973..122aa7b660a 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 db9727b37bd..20384f6717d 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 17c5f93394c..179451b14d7 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 68a4c7fb7e0..8c2c5b5e5f0 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 18889438b78..e74582bc7f3 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 caa97329ef3..ea6a77eb352 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 fc0b226efaa..900e8e69b2e 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 e86cf08856a..e9d4c81b259 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 4f26040b150..1458ec02480 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 e2528f191f2..3217746ff7c 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 87a58520ce8..abc5ca5929e 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 0274dda9f6e..9b0ec55f89d 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 00c37c95d16..efa5737ca09 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 738d9522744..bcd39aaf502 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 9cdd810b6db..075e1f2fc70 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 ace070625d7..10e0358656a 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 f99899527be..07621a9f870 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 22373848db5..4b705ce9a2a 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 1bae8a6385b..947e8df1950 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 b402e70d35e..53c14a8c1f0 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 d348972c4a7..e28c09eb9c6 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 15e85562420..37c5c79765d 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 ef788fc7c26..7097119a818 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 4d555dd1ff9..00d1033f509 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 e75752dbb9e..cb110237508 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 983f9a04e58..b29a76f8003 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 9291f977e2e..803564faa7d 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 17f25a48de5..ee4fdd9942e 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 ce371f547a7..a2ea40be1b5 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 a3178670280..8ea4b7ac470 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 275683c98d9..672ae11dab4 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 a60e6796f70..7972a982a80 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 8ac77c157bb..428128ff647 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 4641b913400..5bfe50d4496 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 ebf42acd763..22b735b6d6a 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 559090a1dec..59ff89e603f 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 230b1bbbd8d..3c024fb4c6a 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 fb837907120..badf58bbdad 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 9ebc67748a1..5630bdcb007 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 94e75aaad8c..1b42580e547 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 358d2532615..ebeb62961bc 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 d49f1c0e78b..f8b2d9b6a92 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 7ef5dc50a07..c02f3a109e0 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 c061659a2b6..6e2696b390d 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 18105f94e79..bb887a1ece2 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 63a516578b5..d49328faace 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 a788fec0027..88fd2c1af17 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 6361135257c..739f681d71e 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 4ea4b3e46b5..0ee1a4cb9b8 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 07a6a1b08a8..9d45a6b2562 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 eab5f39b72e..967f5921c3b 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 e623ed5f22d..9c743d3fecc 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 73b09a0727d..352c621f262 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 aca6a8521e2..22ce91db6ba 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 e7e46e1e55e..f07febd8296 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 63a516578b5..d49328faace 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 bb537d2d91c..0c076c41acb 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 6821f137ca0..9e1635ca39a 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 b4226aa9203..cc27740011a 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 b74f966e66d..075bd6b368d 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 8cd0c85f162..df54631d811 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 3e8f0725ff8..f045145266a 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 63a516578b5..d49328faace 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 a282a267e4d..d393a53ac2f 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 4cee92e2f2e..784bbfb2102 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 ad27d3ad3e2..64dac54dfaf 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 d8a35a9ebeb..3445d350ac0 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 c15a520ec02..df673b11bae 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 983f9a04e58..b29a76f8003 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 cdfe36d1209..97f8a7878e4 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 e79283a1c64..3fadc266c43 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 1961bd099d4..bcde9eb973a 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 bfd657a9046..894517bf116 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 5107c5e49d2..378363d52f7 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 b10b1a30936..c0950712e95 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 62e5359f9d2..9cfc3798454 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 78f07d0c18a..dbad73493e4 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 0baef648dac..95e60f8e7db 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 71d6d13a5ce..42a8aaf8800 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 9fdac9e9e18..04dbf1c378f 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 bb69a196431..cb735f4dccb 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 4fae10d2a1a..f6e6cdfd824 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 515081c0ed6..d8fed9dc4a4 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 983f9a04e58..b29a76f8003 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 8cf7419750e..3f30bcaa84f 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 fbe1dc647f2..061eb21eb07 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 b133a52ee1b..30dbc7d0da6 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 86aa8f52431..3289a5496de 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 8fb3432c10a..1d3af42ecf5 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 3c136a1d1fb..a028274d1b8 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 d18b488a31d..bd912c639fe 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 df178ef46d7..82c58f2f53b 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 c5eb1c518b8..0cd38264b67 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 a6c0eed7630..47382823127 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 8430bd7bb8f..03e94b59b2f 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 c75b7c0df57..3e5c28fd116 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 2415e035140..2f547f8106c 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 545a4f29716..49a4d1aa76c 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 dae939ba312..f511c6ffae3 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 7cdba51386b..6c33f25ad0c 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 983f9a04e58..b29a76f8003 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 c67e216f7f4..2b08ac88a23 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 163ebae27db..6ad4f72195f 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 0f2ff92eb34..8be0804a547 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 3feaab01174..e5955a8cae7 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 6e357fcd7c4..2aec19de302 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 d1cc28d28b3..83aa748d4c7 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 73572b246bb..adccc3a048b 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 ef35334e1d7..fe44942b1af 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 8b944428f28..b08aa49f690 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 e65b327ed4d..d4a21a5cc14 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 686c15e377e..b6b8b68df4e 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 07fe8ec96e4..542380a8c5e 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 bc66c13d4fa..46f5e0ded06 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 568c5ca3ca3..fe5fb6d443f 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 37614c7207b..59a20626ca2 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 632d1cc77aa..5220883407f 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 caab0b08ce6..49139e60970 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 308bc26626a..344077d8a0c 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 78a3ea6eb2e..6b214cc51ad 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 28143a0042e..0c3650ddee2 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 5b35ceba527..52a7a47df82 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 2fbdc561fd2..0f1d7741b29 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 80f2cdf1555..87d4762ad1f 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 8719d50190f..3557ee3699a 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 0a9d4e85863..26f39f3a383 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 c989c094de5..f27be795d83 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 a2c86e5797c..5068e7a3b43 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 b6ab21f95ce..23e5f8892db 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 5cc216bb616..c070877cda1 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 a224087a638..dab4fb36dcb 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 de1ddf41f04..70f332778cb 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 52e7dfb43b9..194429b98db 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 7dee7a3ea79..8a950854770 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 bba82c1a75a..b5573bb945d 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 69eaf600cc2..c3f935f52dd 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 8704eb5551c..67f49d714fb 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 a9c333a6ce9..944deded82d 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 d5e2b93fba6..e20859b4cd8 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 75a5ef3610a..ccb8c439d53 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 eae8c8af9c1..c9bf12f575e 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 137f73e9950..4e410ccc610 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 61cd93168bc..5f680ae4c6a 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 efd28bc88ec..f475be44329 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 fe4b74f234d..dc7d883f006 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 a3357c3ab92..7a6e2dfd8a0 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 ba4e9f47788..59dd0e44fba 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 557a93c119d..b3453e12e5e 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 732a6aebde1..74e4014d527 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 0765d547433..16cd8179c4d 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 3c025551c78..813eba0ad0a 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 c2b61256cf3..6b9bfcfb8ca 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 1bfc1cc59bb..6409e75459f 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 08d062c60f2..e1f3fe4c024 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 f73fb65f230..7f840e80750 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 d0325563a32..1dd528c20cd 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 4d658b251f5..fbe5b7f3368 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 f14eeb8d5ea..1e3989359ba 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 29cf0c762c3..441ef66f03f 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 40fa68323ea..04f8e1fec99 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 bd7d6443261..49272f14b9b 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 ccd55ca21c3..a7259c7a65a 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 66a5bfb1e7c..389f147b360 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 e9c582a63b6..1927f1d585b 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 5819e093dff..044ffc90b3f 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 fe6da9d2057..482d0d16b36 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 fbaddb3c55d..74388bfebc4 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 a5c397ff245..d6e35b547df 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 4ce511af591..55f6999b5a8 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 df244a16286..90b11e14b52 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 67371e5e039..c9eba73ee18 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 52779f59bc4..8c47d2db5f4 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 8198fdb6bd0..9851351533f 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 d7170d8a814..e9d6b97023d 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 c8686ce94cc..da6f73efb5f 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 63a14620d21..db8b1b549ef 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 781a4f0295b..c59993bd95d 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 805d9f701aa..dd11ee61dc2 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 63a14620d21..db8b1b549ef 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 de6bd3d0eda..a9224a5c15c 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 915e9c0dd59..8dbc69e8d8e 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 63a14620d21..db8b1b549ef 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 fc27fbf0cd7..462007f1404 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 a11bad07493..8eebf79e76e 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 84963a2c1b3..abd0778e606 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 12839101b71..856748629de 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 ee0eb2c64f5..b71943e5a28 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 ff13aa4c8e0..cc4f7a79a49 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 fe1ddcc4489..e5c64d6b58b 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 ade598e0087..95ae7e72c5e 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 d46f34db7fd..71cd66777f1 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 490ddd9b80a..6aef7e635fe 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 d7300279279..23d10b03137 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 6631cbd2f80..01d1b59737e 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 064c7398c43..e08b51d6ab3 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 7ac5b2a5c7c..5757c5a404b 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 ed8afb3d1e4..056d94dc4eb 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 9c0f9d2b4ea..701fbf8b78f 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 678b166d5ad..72edc5849f1 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 be2c3095257..a2cfb925c8f 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 925c960bd6c..285363b4bfa 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 6cc99117a40..b2c8a455c91 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 7109e451d79..4f150df1595 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 6ba0e6ade78..3441d090310 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 4bc32e792ac..dc05946e8ed 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 4a70dc1c2dc..ae7aff88f10 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 fe94f6a460f..2170e730ee4 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 c33938164a2..6a32643e8b1 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 d91d332bcbf..ee23f79cd7b 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 00544818ac5..45d81335656 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 c71e74ec3c0..a91a84e2377 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 3e762bafd3c..9572e3e18f8 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 1842e01a135..4f8455e897f 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 fc066d230ab..04b05711f53 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 75c9c5a954f..4f16da71367 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 2184e2a0501..e0a86d9e0db 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 69b9d4e3a8c..9ec6a19c247 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 f9d7379bf56..b2e439b367b 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 16ecb76fa55..f4acacd4d22 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 4554864e8a1..67b807c6499 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 250dbeab452..dbcab5493d4 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 ce0c8497fa3..ebcc713f041 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 a6a08c6e96b..40d2a06765c 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 bb2e3de192b..ccd412a6f7e 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 47aa8841b1e..0860d3f9426 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 5bfe607ada2..f73fabe036f 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 8b179ab3ddb..5cb996747f1 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 aa12efc6558..02b29182b55 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 d658784b209..67c61fa50ca 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 50a8039549e..b6cdda067ce 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 89917799b87..b20601fc586 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 1f6e9f4ed26..45cf74d8f4c 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 e16a5e17162..7c1b3343d28 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 c3ac45bceaf..4291a28fe93 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 983f9a04e58..b29a76f8003 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 8d13e02e49b..93f6ba422d4 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 079b523e2d3..babec53f07a 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 97cdbfce006..5ead1f4022c 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 915ea8f303b..05cb1391f24 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 86a99b32640..91afc8d2fd6 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 d9bc71c5838..530bf5bd56c 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 320d1399b7e..8e6835d1c32 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 8a8b7474b68..a21897dfffa 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 a34034b85b6..ceb3ee6eb98 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 559090a1dec..59ff89e603f 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 34d317c972f..f7e4aa45a8d 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 3c2767c136a..d0dd1de37ae 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 7cb1a1ade4e..e9856b9d7f7 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 7a74cc78534..1659c4defa0 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 222f89d5ecb..5cc8c7d47f1 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 1aae6a91aa5..d5af3ccb3ad 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 759f740178f..0c007be4a05 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 8cfcc05f77c..ca9e13071a1 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 b5e31c825d6..e58bfb0791c 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 983f9a04e58..b29a76f8003 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 b8e0bdcbbe1..0e7f7029c67 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 bcd91e31ce9..c0bf4548318 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 5c7f0b0ae09..09e90c645b5 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 aec6dbfa5d5..3bf0461f4cb 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 907a7330a83..360a1c3ca4c 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 cb07396553c..66b0d356e98 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 8390b016ef5..c1aa70a8de8 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 145beb6c09d..ea289e6808c 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 be31c72fdfa..886d7a4f478 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 8d51b1d4c02..1a1cc3031d5 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 3f9a0d2b02d..1865f27e28d 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 83f5f03238c..d45c6973034 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 25fb355393f..17e003ada84 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 c6ee8b59679..bd6ede58821 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 f0a83aea241..9de845abfc6 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 0526ae58120..0418763c9be 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 8b14404b705..664405cf0cf 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 7e25e8204e8..132158411cc 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 d4ae2f3a290..75cd59daca1 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 e20a1ad263a..efbfd379465 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 78c1669f437..ffcf1c62797 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 323275ac2cd..0b9ec7333bf 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 7c1b841e663..c4a9be45aa5 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 487c2f8676e..3dc491e0895 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 13c97e43f63..50987feb381 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 22e383016ee..a1c3f424c05 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 92b86e472dc..006b059c83e 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 60d2a9da021..b315aaa1ae5 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 12b9a00b1b4..9f26e3e7505 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 05cb314faf0..368b730eaff 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 5b58bff5bf9..89851643b71 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 ea5c1fb46f9..02d49088238 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 230cfcb2942..c1981ce1c52 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 8243bf38481..726348e2938 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 d07435309e3..969f1dfb75b 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 ac3b371a0d6..4334e808294 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 e7820807c07..730537515a6 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 4eaee2c5e1f..7b633ea4dc7 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 406b55cd013..50307683fb3 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 5ab8e74a748..32580b0f7d6 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 b7b05671437..f42ba099160 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 30f03466431..fd85792f162 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 ad27d3ad3e2..64dac54dfaf 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 9b4948699c8..2b174c4a334 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 a865475e8a5..d3427e95a13 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 983f9a04e58..b29a76f8003 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 29f40601ca3..c3c2709e677 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 d3120f29512..08bc7cc45eb 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 71bec958941..9f86f036630 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 d4090d6b39d..ff453ab17f3 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 b5cb7d56c15..879dcec8cb5 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 033844ce087..1eeae30e721 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 611ae1638e6..27f1f382183 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 b9521f4e3aa..aa5381eab82 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 221e1eb26e4..e468149d3f3 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 028351f35d6..1f11e1b86fc 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 e32860e3c86..9908588e681 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 028cf173083..74d9a4ae5f2 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 6d7ab99334b..03a076fc3d4 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 c2a060819c1..3bf5eb02d8d 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 c16be5b024d..e2ebeadecc9 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 3be95354f8a..e123d72006b 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 f7f5bff8edb..274b63d3a02 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 52779f59bc4..8c47d2db5f4 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 3eec1900cbd..9edb39f3dad 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 8ca85fac831..da540f42e5b 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 f710d8153f1..813c7ca1939 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 52779f59bc4..8c47d2db5f4 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 421db138ed6..82b0e11280a 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 e9b11ffccf2..b892d1529e7 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 30570eb74a2..b3a57b18978 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 9085068ffff..69805fd6116 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 282b628ec63..fddbdb69b2d 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 f33fa6b1978..edc17c9a22b 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 0f617948ea3..7c7cf11e864 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 0cc53bd0365..3a1657c2e4b 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 9085068ffff..69805fd6116 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 dda09cd2f39..8fe2b671ca5 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 10442d99866..f5c4f8e3361 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 e8e07c5e1ba..9489ddfd953 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 1167857455c..09b1fc2f963 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 9085068ffff..69805fd6116 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 0600dd88cc4..c1acb452ef2 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 bbca13acd33..c7beda4514c 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 47ebf367e1a..b5ee8f428e0 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 f15fdefeeaf..d4ad2acbfe1 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 63a14620d21..db8b1b549ef 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 47d03f2068d..adcebe73a2a 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 9c279bb5cbc..c8c96d3d539 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 a6c0eed7630..47382823127 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 a5bb60c9394..0a4f329bac9 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 89752f51f0e..3d31743f1fd 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 79e3ea4c55c..e200f4835e8 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 91ccaf4ca73..1b16621baa7 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 f010167913b..b5e71ebe008 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 40bdeed86d9..3d193e79add 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 618fc2f5027..a8ec0cae14b 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 fb124527519..7391b7923c4 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 e09766089ea..27e829ef7f5 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 fb763065f64..ff7996d9927 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 b59ff513fe6..fa0dcfc019e 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 7e5f116bea1..4e112d58a49 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 0897b950ba2..c3829d924ed 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 ac7a53076ee..fbb3ae69b16 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 acbc51ecb9c..df58f4cf514 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 bcf276e67c4..1361e5eab87 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 544b1a4787a..2c2d34907b5 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 ec8d5a91d98..404a74d2895 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 2a0c7cd8d15..278f4996ac0 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 d4ea0ab1ac4..d9ab928e6c0 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 6500cca927e..5c69e379b4e 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 26869cedbc8..471dfbf3993 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 39135ef2909..54dfa2b5cb8 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 153253fbbe6..ae17f6fa99f 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 7be380042f7..4b0f1d5a964 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 0c3e143eee4..f501535b88b 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 89fd6a8a9d4..bc66c8096b4 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 cee970dac47..0380873f0eb 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 bc845a2fe7c..19ba4fc6bd8 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 f959154921a..1edfaf59dec 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 81cb7aff055..1a7527712c2 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 e5d5d8980de..bda8ccc3fb7 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 47f634c2c0e..96f234db037 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 0a227c3ec7a..bd11c95418c 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 bd85813f7fd..b472df08585 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 e9b22af1d5b..fffdfee48a3 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 835e0ba5ae4..20da6d6b743 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 9c588aa2774..ac15424e705 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 679d46923b4..40d618496f2 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 a2e4d32d292..bf7d180dc84 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 1805cb89caa..65b978a5968 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 fe0e3cbbf68..0000c4dd323 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 5b1212a94e6..4be0a3b3bb8 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 d92c4b5b6a0..8d8b2be125f 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 f557d870453..fbe511453f8 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 413365e0b19..e05e370f8e2 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 1166c15e0cb..798ed94c12d 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 98224c0d74f..1426f07bef3 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 08a04e69d7d..0b132a567f9 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 33a84ecc6d2..f8fcf956082 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 1290fff33e6..9f161af50ee 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 1c720184dad..dfbf4e3e7cf 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 0ffc4b4b558..6fb82f8958b 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 055c4fc7f53..a41823163de 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 ef5f28c294b..ea28f4e4c7b 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 e3f463c622f..78f50136e1c 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 ff98a1c3bb4..b8cccad99b0 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 5ca23ec7d9e..19cd6bdaff6 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 ce409d8281f..8f8d68ae515 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 95410b4d548..e298942b285 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 3381ac82eb4..f463849a283 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 0618ff740d1..31c990e1e5e 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 9c50eaa6689..2fc69079c82 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 01b0ac441bd..c0cfc338886 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 9e5690f9e2f..d20ed3226cc 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 cd94a97fd08..4404892c384 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 cdfe8a91015..dcbfd2519e7 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 7bda1ca3c4f..167eae18e56 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 f399743ac63..1473ce623a6 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 27689459b8a..d09a79d6bcf 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 c747a3ceef8..89d7d0bc14c 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 8b28a08365c..3bf684c72c9 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 09a76e79bfd..52fc4243c6c 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 fb2db11d1f3..7c9f36a3946 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 bfde6745e98..2d592671ac1 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 6fcb5106371..28b360f529c 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 beccb46197b..6be5ea14ee5 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 12dd9c1c3a8..8994849b0f4 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 8c6ef3cf92e..b48eb99b015 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 61285e2e1f2..4d6af5bd91e 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 46ff054d946..28136f04022 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 c43ae5f32c8..ee73b51d26a 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 b2a1aa5e808..669972dfe27 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 41158dde8c8..f6cc08171f3 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 b0cc21ddb92..bafe573cee5 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 3f612073ddd..ce94644826d 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 4be51c5256a..54dde65922b 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 6dc1b258d34..a0d1a0b7910 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 edc2c1a6736..df5220e81f4 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 1567bd2e6fc..1e600f21f12 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 0677a49b851..867b6e777f9 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 e768a0c7a0c..4cbdd666a28 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 065656e861b..c8eb2b58dab 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 dab9febd51a..cde51311577 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 37a395cd4da..089c8f66a29 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 b56c26657e2..ba9e0c351bf 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 78c2824d395..1a83c929578 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 42f82595051..ceaa956d443 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 7cbeb7b121e..7e1e0b46bf4 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 6c590f2d41d..30e27f7cf9c 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 cf15a2e8c97..efaa9cbc677 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 23e776bf0ab..3c69a04d85b 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 6715092795d..79d6bbac533 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 37b66700cd0..77d0d42f57a 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 8e67e61522c..0f1a3153f7c 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 14f50b9a60e..8e8fc738da5 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 37b66700cd0..77d0d42f57a 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 4f95513188b..31f66a15bd2 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 ad2b9f45e05..8e405f11f61 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 90ee50de9b1..2e288b849bf 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 bf4ea98e0f5..13d8aec175f 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 0b487baa3f8..fa518f6fd91 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 188277f5938..7bbe8b9bdb8 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 7c7e70accea..5aa89eadcc5 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 ebcc95dd497..aae9d33b948 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 729910c2ec3..f79f35b9f98 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 7497764224a..314928eb0a4 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 de39b7d7d87..1d6e8079c7a 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 02c00c73a3f..4d4b9751e88 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 d4c33be4776..5170bf8ed98 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 8c6be8b00dc..c654a1f20b9 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 2ac75856c24..a0511681447 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 1e184071145..b2a18657f4c 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 0773f095a4a..1ecd625f7cf 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 aa77f28a6ba..6f39100c794 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 37af8128446..9d2d204bbdf 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 f06709a007c..142b4c7cc79 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 1d7a1112660..65b0ac7770a 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 16b3a6f03a4..bab08cd2a4c 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 8c6fe8f11d9..47725630c9d 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 ccb18eb54a8..654e7cb8e4d 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 dc9ef44fada..596a8d0291b 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 fa99cd1d51e..4229b3cf487 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 13a8cbafe29..356f40236eb 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 b9502005ee5..6bcdca0dc86 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 f8b88b2a156..84f68cd8b9e 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 3e894bdd6ac..d2162656649 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 83557b1f3eb..d11094265c1 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 aaedee4c4d1..f06c2dc9ada 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 3a35577dbfb..0d43c9c2e49 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 5514eac3951..a420cb11ec8 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 f83bc5e5326..d4cd13104f1 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 358bf63318d..f8e7593e27e 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 1d82b6c8d27..665d5fca1ce 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 bb70ca0dca8..b88d00d5239 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 826617e60ac..a12a045c5ce 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 896c495c544..380610ba6f0 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 6f85b00d515..8eabbe79ee3 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 3071eecb099..72ca50aa002 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 6946236c6d5..bea808e3fec 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 5847be553b7..8814487a89f 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 c3bc11f50cd..3a1130251b2 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 5633cad7599..ed06b95b695 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 983f9a04e58..b29a76f8003 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 409571e1295..5886c2c6b23 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 6001c7bd832..ae70514c6a2 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 656c5c46ffe..669b36cc4dd 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 783969d9140..802fa2ff7b8 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 6e94ac765b6..5370b7f3b23 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 abfca46caed..4844c70d521 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 934898ae293..8cb86ef9dca 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 3c517a27024..1f33750280e 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 151d4bedf0b..7ebdb5742bf 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 6cd9f4b93cd..040f0045ebc 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 373a8102515..1ec116beca5 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 da22b67cfdd..8cb5b00dbf4 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 0b5a79b2696..e754a498886 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 983f9a04e58..b29a76f8003 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 92982d1fdd7..5ddd879947b 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 fbdb47316fb..63b8454fcb4 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 e7bc5d6e8cb..15f68494696 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 8b64dbce11e..93b6ac6a1c7 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 0cc11a116bb..d5ee3b74b29 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 461e09731d8..2e41a35ae16 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 15539adb970..59ffbd0d65e 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 518a3d7c82f..4d0de4df95f 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 5756b4ebf71..d1baa8eb614 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 e57f36a2392..946b642b29a 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 bcf71ba8d54..aa37acdc57f 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 23b9c287e77..4aec0f0214d 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 c2bcb20ab9f..56f771c7fa7 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 f5781ececfa..ada4b41fa19 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 b6eafec3cd1..185b9d85497 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 c28a1b46e5c..e7dff75b9b2 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 2b63ea2745b..deaddf87c0b 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 96df8c8a4af..0c3805236a5 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 a9f6d614848..daf969e20fa 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 84963a2c1b3..abd0778e606 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 188c3d3de02..0ffec9559b8 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 ebe09f30c99..5aab81324ed 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 ab646d5a7d1..2bbffda99a4 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 2d3eed267fa..bd78326d080 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 7c3014c3a24..6d971c2ea2a 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 0250c30ead3..c69125cd72f 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 47d33e019e7..d323f45df93 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 b3dcc3d8db9..654483b0601 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 156d547ed2d..a7e819b4b34 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 e8744d0b06d..12ffa93cad3 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 ce6cb0b2759..d33d6953e45 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 c60f84bac34..3f9f27f3d35 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 2cbe62b9ed1..181de4ccd34 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 ff136db6fa8..98d6bf689ce 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 9f5ff8f5312..454291d6d7b 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 29f9fef5f00..2e8d29ae9dd 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 be9f6d1c940..8f54713bd78 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 59b1fd23093..fb7f43da80e 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 f48cb2da55f..4a2a728d6d5 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 c6a034cee8a..6038638c395 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 f00c88e0711..72cf0044b0b 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 740fd8519a4..65c9b17b8c1 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 a579d1a06d3..9a8362c72fc 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 a4fac6d1696..180126cc5ca 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 057ae7d58b0..eaeed267972 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 3fb52d55bb1..29ae262b654 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 69d05ce8d20..d2b1e3c9ab9 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 5c053cca06d..af2d367c006 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 7535e3c5697..1dc523d173c 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 85793a7c257..1532eaa49f1 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 9c24fe27a3c..2269240ba74 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 627b524fac4..cd211eab8fb 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 3edd785f387..1eef9cc18ed 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 ea778433c90..77486519710 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 33c59f33594..e870ed17fe5 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 39fee4e683f..fc783cf8542 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 12f014e7c30..bebc4b76d60 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 a500ceaf5d7..69f35626b5d 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 a9fdc51ba90..8a58df5e75b 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 c6c3ded55d7..d5f37d64cb3 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 3ca73b4fda3..fd7019f14b3 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 01a5e482e3d..eb3af4f20a8 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 e30cc1360bc..d04d95ce4c4 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 40cc17aa6c0..e7628cebde2 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 20a974d4045..24576f9578d 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 dac427570ea..5e81e2aa8f1 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 ed62f5b79ec..d5a9a47e484 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 91503b65a95..a077b8194b0 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 4658e3192a8..38ab98672de 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 983f9a04e58..b29a76f8003 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 a64965b5d1e..8f660ba26b7 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 1bae4b07e60..29e4d996a5a 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 0bc2c9d5ec5..5d5efa99b6d 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 9e906784109..4899186bb1d 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 ec171d779e6..fc90e8977ba 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 dcdc693b6b0..cd510bf941d 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 a840820b25f..867632a4df8 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 4fd7f272ffd..507c031e57c 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 6ae7d06a8a3..8d8ccf0f851 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 559090a1dec..59ff89e603f 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 2cf86f2d1a7..864779d27dd 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 6365599c923..4f9e400e768 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 162d2b737e8..9f875679ad4 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 c8dce4f2904..36cbc2391ff 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 7f0823c50a6..8b8e2ff1c55 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 1aae6a91aa5..d5af3ccb3ad 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 79acbc62bf4..0f2bec32575 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 699631ad2aa..c878fb44a41 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 3b8b567de46..8044234eb0c 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 983f9a04e58..b29a76f8003 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 93ecf4aa6f3..aad268a3d01 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 fd6e197c8cb..1b3745f1876 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 051e2948615..38e3295dce1 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 973908cb77c..04a42837e00 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 af2e516d1cb..ca50ffe7677 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 ef325872cf3..bca27676b51 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 2eb7dcdc5b8..e08f39c28e3 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 0e5eda9436f..86d6a3183c9 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 8479b72b150..e42b21f3c41 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 0dc4e7ac68d..7d22f8a8138 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 8a9805d9c5f..074d7001fc6 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 ba8d9270e42..8910128a97f 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 4073f1f2430..80f72c08dd9 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 983f9a04e58..b29a76f8003 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 f87c0076db8..095e9e84859 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 970915a20d8..e51c3d76c4a 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 66b4ef6a22a..2f6e69d985e 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 071b7d6cb1d..186a3d94e6f 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 95aef675966..0e2d7e7431c 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 31bf495a6a0..24c2e4ebbb4 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 5fbe55abe59..d23cbeb662e 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 6b3951e9b61..50108236832 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 a6a8351def1..fd3b2c1478e 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 ea8ac8b2d9a..d43faed81e9 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 bbbbfdae4bf..5fff58c8dd2 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 a1b4c1a7d59..c9339e92944 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 6d1faff5c2a..3e7bfcefaa8 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 95aa959d9d5..922b1cf415b 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 c91927d26b8..be8b322ef36 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 7c38cbfaefb..96c546ae1cc 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 df58813b031..1fc455a1be0 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 ef1818e0814..02a43a5dc73 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 f3331d3812e..8db711f6451 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 a4ce655cfd6..1db63a3d00a 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 56233fe2805..f49f797ec94 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 b68020a939e..d995de828ec 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 62bf9dcabba..fc611cebd3d 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 39605851486..03a509eb912 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 7974ec166a5..f6383e03324 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 15b33161d21..40219f94d8f 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 6ff86ee31cd..06c883b16d5 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 5ffa39be776..70781730c76 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 acd9af0b00f..b204d5e83d9 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 d5aacbbc091..e2777a073fd 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 e5d31bb9446..241a18bd728 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 bfdc83352c5..803500cd594 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 f2f44e0f5f5..e9b37ede00d 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 b1a8040f9eb..adfacb8adc3 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 8009059037b..dabe5f05729 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 081de792d79..ab1828b7a3c 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 08c97840501..41cfaba473d 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 39cba4814d5..2ce5b852a77 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 e64fd032627..4685fa5fb65 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 4d8d6bbb5e9..564cfeee73f 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 754857b676c..4a7251713a6 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 8acac3fc865..222c4e4f892 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 a723b74f147..bd950673215 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 76d14714da8..14af3e0111d 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 c1259a67e34..730d9e0dd81 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 67de5030d0a..42827f1d1e2 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 45ad71318b3..3680221cecf 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 5bc43e3012a..b068be51387 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 97151916ae3..75960fcc627 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 a3533b11825..5ad449bdcf5 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 307a63cc3fa..35af96359d0 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 7fe49b8944a..f308bc85273 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 7af73629f7a..113983065e6 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 848516d9898..eeef3d3f21d 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 e686c829046..bb5528e8016 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 e3e76958ecf..cf88978bffc 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 965108e52cf..7f520d9b55c 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 04003f88089..ef4729180a5 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 307a63cc3fa..35af96359d0 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 a252a49784c..bd1e9ff0b22 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 d520608ebc6..84c118ec6f7 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 daad35c60f2..b5ecaa31172 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 46e718d98b8..7f1cba404fb 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 4a8612f87d8..158a6150155 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 0d8a64316a5..5cc5aeb4ba1 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 0f255e017a7..5babb818911 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 eae069ecb76..0aa54472039 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 7b5b3e92b71..2fa78f42e46 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 675136532cc..ba28c5c9cf8 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 551dc6426e9..0f6da54f9a8 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 f6b6dfda7b4..5072aa333e7 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 7683108329a..5e8db96b07b 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 14a3aa59567..e40685b7c5f 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 2d51bf35990..731481deed5 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 c15cd42f3a6..961ee6aa8da 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 4973ac5a879..e665ddd185c 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 03d2dc05f15..b91746abaf5 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 2557633adeb..87f0927e7d6 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 b569c8c0488..ef98ec70f81 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 522a53309c2..d7358a9869d 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 ee91ab4d5c0..3ae35f26e5d 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 7bd6a4c282f..0d6a2ac29de 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 0341d1b78be..773c4f94f4f 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 a8a98f6aec2..73b2ae110b8 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 dc4d9ce9a07..11f0ab55c12 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 ef5d0a1caa9..e39a2dbd342 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 ec94ce1a4f6..fc92bad819a 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 8c91b5c496e..6998c61e604 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 968020d8145..bc60b2c210d 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 bdf59a4e6ac..a9f1c7a9573 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 6b635136346..29cce5a77b8 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 88119130512..035c163814c 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 c03f5a032cb..203c85f2466 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 1d84805b7fd..039fdeadc7f 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 f11bfaf7837..e1df1706b3a 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 2075a389cc5..fdff5b43e03 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 b07470a90ca..2867dbd8a6b 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 7461f3e9782..0c3f191a9e8 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 bc9cf9f8671..0ff3cecc8e5 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 04a545415a8..1e164e89bb9 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 983f9a04e58..b29a76f8003 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 e72d921a129..f674740da97 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 7d65ed6605c..7225dc4c467 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 fd25fa96635..f791a88cf78 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 1ab11432f40..68402d1d917 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 02f4523cc13..3bcd205eb77 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 4d3c30dc9ef..995140d045e 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 8c03a9e5c05..e2693ed59c8 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 4ce5cd733e2..a3b2c4d4c78 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 ed8f9ffa4b0..8681024390c 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 983f9a04e58..b29a76f8003 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 c04bbbeb00a..46a042ac53c 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 1b703692251..ab663bad5b8 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 a865819c515..56088726f04 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 ed31049ffa6..66e529a29e5 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 6b2d3454eeb..d2b1c6ebb41 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 4f943802c95..aa183647681 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 70046ab18e8..8b021b61c9b 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 22f8d75e811..6b7f7865bca 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 133812836f5..ef9aa5a4522 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 2adb6f66953..3049d482d7a 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 d36dfb8b448..76353c85266 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 a641345064d..2c96417921a 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 56c53e237c2..37662c157cd 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 f0f2be30ce0..6b6f65e411e 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 66d6ea2f8b4..28629011de4 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 8d51ec7bc84..b883710b12e 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 8157544de16..da9e1156436 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 4ac45d2087d..6e313188208 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 8132fc0ebc8..6d02cd8f9d5 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 20ae64db88a..d859917007b 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 d7f787e510b..c36c9eae5d2 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 a12b526c76b..433e4a1db47 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 18cd74f7741..abbabc2c2e2 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 181a1edb8a8..d168f0d5795 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 aa2b8ecc60b..ec95831a360 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 64c39fe4948..1dd13804329 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 3f4eb5149a4..b7391c9f073 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 f9073070c06..8d9d94da75a 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 a77aa600990..81086cf6691 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 32ca023fe57..892a8381768 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 ed2cf8476a3..b256f79bce2 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 9ca1d9e5e4e..114f3ca58e5 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 2ff9c0b6222..e2d46b46652 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 6cfee9e7ac3..6ff1de31305 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 c5244eafbdb..d304dc1796c 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 107b0fda93f..9abe435369f 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 db1c42d0f56..f9abecf2048 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 62422302639..118019c65bf 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 126c3742677..18d81ecd3c4 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 9cbb38bdf23..60c67899076 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 25dc83b365f..612a2ac8906 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 f3f59779b68..ed649ba35f0 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 96968fcb539..f6899a364d5 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 a6f374e4e25..528157f970d 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 34d2225f691..c41458bc9eb 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 59485f0dff4..122b3d5ef91 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 42aa1996ff8..8eb3727f50e 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 b56cc4642e5..8c417a205f8 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 5536db69b1d..0ce5f8f74d8 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 4dc8d92a6fc..1f24157da4d 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 b1ba7325172..236202a6556 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 2ab188db863..871c63ca3bf 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 983f9a04e58..b29a76f8003 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 ea6a68fee0c..d1ffc5c7716 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 210f8ab8f54..9a30339d8fc 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 fae2867de4e..57e5a7b7b30 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 9294bd2b124..038123f6084 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 01966d93532..557953a6ad8 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 efc057b4839..099e209dafd 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 0e5924d7676..52332a51ebe 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 2b04b36786e..d0fffb8ee46 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 ca77f233e88..f7306fc3b59 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 983f9a04e58..b29a76f8003 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 f9a43a4e391..7403746be7b 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 ad291ffbf35..2aa75190bb8 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 8dcdaf4bf8f..637cdf7c0b5 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 b25dae8b93f..9929e5ae97a 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 31b4d96e0c1..984197d72cb 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 5c7853b2994..2e218eba358 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 26840847c27..518ec68f90b 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 d37c051b530..4c4834c9966 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 cd3f26ff39d..4a6a1c74c7c 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 1aae6a91aa5..d5af3ccb3ad 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 06c35bdf737..57ea3fbd92f 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 42178ee3fed..be4becbfdcc 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 8cbb6a6429b..a65973d20ec 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 983f9a04e58..b29a76f8003 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 8f7592de6f6..2b4ab363e06 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 651858af1ff..d477a739cb8 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 e7365f43244..df340e1270a 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 45f0c5cd5b5..15372353a89 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 f4118a7ac5b..1444306a5bb 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 d9060d32fba..ddeaffda21c 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 7d11b19bebc..a13453e5760 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 df328ff10ea..d03533a6615 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 4bb55053e75..aeb16c84a7e 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 13714b4f18d..a9910810fb6 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 5190be3314e..1102e28157d 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 90a912790d5..0fc29b89678 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 8c4eb4cddee..407dd107e5c 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 1816945fced..7eaa5682dd9 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 9ab62ff5bf0..3f47fa510d9 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 9ace2539771..3c27c997a57 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 33e2aafa695..94fd1a7ae6c 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 8b84e2be47c..b68476d9bbf 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 e859dacb589..581afb45c8f 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 b9916f31727..e5720f6d823 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 c07c964cd67..fe63c18499e 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 82f489f5fd6..39e207ad3a0 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 a8eb320ed26..52413428c5c 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 c1259da69a4..74481959747 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 6e7d7d26f8e..31e504b8995 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 a723b74f147..bd950673215 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 103eaa50983..c601745f03b 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 92ac5de39f2..3b0f3d88a16 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 67de5030d0a..42827f1d1e2 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 1edcaf12d1e..72671678f77 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 bbe67e36d9b..28be0c102a9 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 91c2b9a1c47..b8eeb94489b 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 9fe193fee8f..52ff7c875de 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 93e08a556b2..824c7d802a9 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 6cca251a6e6..2c6590050ee 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 1aa48e43fe8..0778e3b15d0 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 97359cfbc6c..03856b0e338 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 f7a91cbc538..57abf55d17e 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 1b9742afc40..8b2f3cf521e 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 82872348c2c..560f3109a70 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 9d44e32c319..ae0341b2800 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 efce76e2df3..411614f910b 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 8b1a0d8b7c3..ec013feae04 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 00314bdd7e4..d71e275b025 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 fcbb4f5b1b3..0830887b376 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 dc43e5f8feb..72ad87848c1 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 61a15d14fe5..097bcd1a392 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 55bd4904061..61c3d1b2690 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 1192a69a57a..bf10b2f4747 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 6e9cb4fffa4..49ed6660c21 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 5a88a153980..776b49ed8e2 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 dbf3fb48ffa..5ea1650197d 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 659abf22fbf..3ab81e9169e 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 36d8020c130..c219091cddd 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 722f28333c9..d169627477a 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 71a131968f6..1a520ac84b1 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 e2f415ff5bd..ebb48ff6e25 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 22f56eb1cd1..a9ff24fb73a 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 5030f6bebfd..cb7289747d0 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 b61a9d03f46..010603e0d33 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 2b890e661ef..41fc41c8fd7 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 dcdf5a51302..eb819f42202 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 781d1924460..d55d2dd3da4 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 2a238139499..2bc6eda112d 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 a7e3de35b69..6f679cab4b0 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 d2e2100b83e..c260a02cc7a 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 bd33675f9d6..23497cbd4d8 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 9301c0688ce..13cbf9ae54e 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 dae1cc10504..e688a8253dd 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 d0eae613de9..8f060b14548 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 3d73bc2cd72..6ed4c7893b3 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 67ccc17c093..e572ab41694 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 8ecec966507..00b6d561f89 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 5e56f18ab58..c3ed5b178ff 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 8567b7bc773..3760c403f3d 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 cc1ce00d7b2..61f321806e0 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 b554f795254..2a89b9aa236 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 0f0eae132c2..00a60345cae 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 e810f05b7a1..1d0143c348f 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 e4d0461dfc2..1ffd1385791 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 65230282144..9ca80425dd1 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 c0e5ef9130c..7feed5a4638 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 ee96f7f6818..a2d08bf0fd6 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 1545116a044..591fdb7753c 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 9fb8fdee9de..9ae8b579e67 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 c07c964cd67..fe63c18499e 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 c497d0a2746..e7828e50544 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 5250ce0ce5e..10787fa0a80 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 4175c1c4b51..f9e30b73b0f 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 9e51a1794fe..3bbff227926 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 a723b74f147..bd950673215 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 199ab106d36..fcd48393c45 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 adcee9d1832..2c5aeaac9b1 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 67de5030d0a..42827f1d1e2 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 2f4cf0cddf4..299a3f65ce0 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 efed263ed5d..a09dd615470 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 df168842762..efc87a752b8 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 4f462f14ee1..fefe9822f9f 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 93e08a556b2..824c7d802a9 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 79c34798063..0bbcf741eca 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 7548ec2db27..c96eba39381 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 73325241351..5e36b630467 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 cf0ea46868c..9d25b9ba464 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 d32eb91b479..877185dfd27 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 ea6700651b6..457b5beec4d 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 d6d2c60f07c..2d35b0e79b9 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 fa67a7c6dfb..b61a92e4efb 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 8e68fdf6c0f..0b6007a2ae1 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 b99c9cd82ce..0def92cca91 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 9c7b69dd09a..88f8b90a45e 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 6cd8dea4bdb..1b3147606f7 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 0c319819796..4721c461161 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 db480a48819..89a3a0fc289 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 b9209f89799..3743236a7b3 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 95c15bb6f36..16f59a9a8ba 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 080b73c1c12..2384ee2a6ef 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 782efb5c93f..73b445ee091 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 659abf22fbf..3ab81e9169e 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 82011307ce6..a6a273f3b16 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 722f28333c9..d169627477a 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 2e5e9d29c7b..d79d102d501 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 e2f415ff5bd..ebb48ff6e25 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 76f7a60a5e1..9350c19619e 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 766df152d82..bcf17efcffc 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 49751ba6dbe..7e2d6f29b3b 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 2b890e661ef..41fc41c8fd7 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 920742e280d..332a71ce54b 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 974897ebf1c..1e74c80a038 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 54c79d31ee6..e1d83fc4a42 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 e67b63f90d5..382a98bfde6 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 d46e5f3d70b..255d3d89b5a 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 a6f1fd8a375..0f61369274f 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 9301c0688ce..13cbf9ae54e 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 4af6d971f51..a973ade623f 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 2031c247358..a7cfb558d42 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 25b6edbee51..c659901d463 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 7d9ced34acd..f15bc00ff12 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 b40069b9f18..21010e786e0 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 82c96bf627f..0fc672f9e99 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 60a18f39001..82af19fc15a 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 091211fd098..37526e89c0c 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 d61d67c387b..1754e67769d 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 dd9d8d7259c..1798bf95e79 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 ec8e4dec115..3fdc1a465b7 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 6ecd8256ba6..ddd18d5d6e7 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 5791ea538b0..07339747c28 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 e2dd7517919..d714f7dd041 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 511f58a49b1..7e38ed43a36 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 e9715885472..6c29bc13271 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 4531f041838..70a6db73aaa 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 b986d6401eb..bda135edf82 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 559800db300..6f91e78d0af 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 6c9e43b2ee4..9eb61dd77c8 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 19a5974b7c2..55015513c1b 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 1edcb3f80cb..daa7d7fe1c0 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 4bfab4498e2..4358e4fdb74 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 14455516b17..b1d4fdf0a15 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 890dab6d315..98e53c9d91f 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 cff41466517..c5140ef758d 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 dd506ecb86d..6bd46cb983c 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 dc459f40ec5..6994d36b987 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 92eae7746d6..2a5a81a060d 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 3248c60cb71..e83bc30aad6 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 ea1d94eb722..7d93ebb1206 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 8ccefafa0b7..d060768d0ff 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 831ac264f39..fd3f7030e70 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 62091c0b24b..ddb19abf3e0 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 84c2c6d325f..9aacb0c4ecd 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 fb05ffd8a47..8f9829cef62 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 c3ecf094e28..9fc576866ed 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 1e5b4ffcaed..37cf9645c95 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 37aeca56ba7..1ca8dce1d5f 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 f1b124e8544..c881290ebae 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 f7bf66aaee0..c01be9497d2 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 a9a3f3651d8..eff31197716 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 75c13e75741..56883e8c056 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 e3e63914e40..4389bf5e202 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 93ef2eed72f..9afeedc41c3 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 c6a5f99963d..215b669f842 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 caf91e06060..0c17aef37ee 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 d6193fd014b..77bef7b48ed 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 d7fa4c11789..3bbd8ee5854 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 eb34515d647..11bd9989416 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 4f8971303e2..47a43776d78 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 3a99adbf53d..ac823e43453 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 2e2cbeb0e60..c783333ac2c 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 b7028be733b..0f16fff7194 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 983f9a04e58..b29a76f8003 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 1c0b8375fc9..193c3b0ca4b 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 c84163c2de8..98983ead20d 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 44667b9a338..a8713ed9482 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 742eefffb05..c9ea8353ff9 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 b03a117e107..ed4b7c415db 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 ffcbbb46be0..c958b623600 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 e741aa02baf..b1c0a9606bf 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 e8bc240221b..98d2b8772c1 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 502ae8af938..0d3ed7cf944 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 ad27d3ad3e2..64dac54dfaf 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 2b05763e582..a15f5172f2c 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 ad442d2fed0..45626cc401e 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 983f9a04e58..b29a76f8003 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 fb0ae6c5829..5c2a82f9662 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 70c09ac28db..f104abca3c2 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 57e8e7a6d06..d0e48605828 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 16e6333d576..2848bd64117 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 1f3fa45256e..f5b686e2f09 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 29bc22edce1..120e597a35c 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 830e7d0e2ce..bf7e4227227 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 649cb2543c9..3910f3d4651 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 0a2daf5f52e..9ca009c759d 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 cff41466517..c5140ef758d 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 674e9080daa..f3bb5fd1914 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 8cc38e9dfed..3c74fb83679 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 c4bea327772..3b10620388e 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 42956b87133..bbced9cd240 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 cced1665ced..242c6c7a00b 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 e5167c56e95..dfa25b63713 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 1100a3671c6..628da594e7b 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 f168d24cbbe..c29d69c4828 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 814b46dce1a..84ea5f29d6c 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 438dd954f1e..0b54a8c1bfe 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 4795a46b581..7d60de6930f 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 fa199d8d577..a04bdd69a4b 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 307f270c9ce..8e2b0539456 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 9df8e5a598e..f1667f92590 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 02c7519fe54..fb6a5a28d49 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 c4fb31ff105..cf18f49cfe9 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 233577c1a82..8608349f431 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 5b17a0ee66f..2cbe24138b3 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 934c867c12c..f9ee31089f0 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 5542e4e18d8..052d6b50429 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 b8ce2b5732b..0bc34c40907 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 4c181c746fa..a53fb1cdc21 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 74db8b44589..4e96c6c75fb 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 2d6dcda3cb0..70217d51ba9 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 b5c0d236df4..6510bc0a918 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 f92929571f0..1706a54e890 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 7370c7294b0..505a6f2175e 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 34062d37ba3..b64cf472462 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 40599471087..6a6485229e5 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 f1f0031807a..bf3cb774927 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 52f24afbed3..a42abbedd2a 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 ec10b1d93ca..2a964510367 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 0bea91ea073..f1116aef91f 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 0fd54802ce8..39b9ef5a0be 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 286b130418f..2341c14eee4 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 6719fa55eb6..f4c945a28bf 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 9e36eb0c27e..07fff4a4624 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 2ee3cfc52bb..eb3bd35859a 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 5795aff18a5..5042a24d3ca 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 8e27e214bc5..76db848a214 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 5d431462eb4..384a69eec48 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 88e10e92db0..7d78b247757 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 4d2f41ed663..385cf349cb2 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 7b6b0d051ab..f66243fdfd9 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 01fa9b26e07..0c6a953c5a1 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 a63d09bbb51..96bb460b748 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 a615aaba28c..1dbc65eca4a 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 c160be58bd0..227cffb15ae 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 2fe4dec5643..121810e730d 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 13809e2e5ce..72b6c416412 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 89edf13850a..44d065602b6 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 826379039f9..f27da25399d 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 4acfc40cde3..4559166a048 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 d0fa9bac227..f194349f323 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 3220db663f4..414f872012d 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 8f388f71141..5ab3fdd9a1a 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 efd3457870e..2c585f783f5 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 31a4de19d0e..c5d173feaf1 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 3964899f09e..bd62994b046 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 671364f7bec..bcacff7d932 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 cc73c0913bc..04ae9e03034 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 00cc3b03f2f..853874f712c 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 5a616ce81b2..126736a54c0 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 0caebf1a762..291250d9914 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 983f9a04e58..b29a76f8003 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 01ab764bd3f..3089e2a2638 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 94a810246dc..113d8d6af37 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 1528a65a5f7..a8d4b27aa8e 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 e1446abad40..6d0205c4459 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 9926e207dab..655bb31def3 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 e10bd564b79..1f19bc2f7e8 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 b2814f726c9..d7ae088cd2d 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 5d2643d5655..e4942e90fc1 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 2fd57945c11..64511ce03ba 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 559090a1dec..59ff89e603f 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 40ce41230b7..73459a091a1 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 2d01c9a1af0..d618f1ca1fd 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 be3e5bf316f..ff6eff5c3ad 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 8eb582d6d59..85e2089d0a9 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 d133aa048d1..c5dae5386ba 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 67de5030d0a..42827f1d1e2 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 d22c8d7a5d0..e9e85cde125 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 924b140b8c2..b013079d385 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 0fb9c883001..6a8f6c7fe02 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 e2c659ac279..96f81cdd228 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 4f19bdf159b..e00324f45ce 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 da1e1d0fcdd..6de6855d859 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 af9cf4e5f3e..511fcb0adc3 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 5920011fbe0..c95bd8561cd 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 9338fb88df9..3d9774473aa 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 3dfcc3c7183..75546ecde8d 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 04b8266c426..17fe8218619 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 a31614ecf6c..3900f7c6fd2 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 7e9e8375b9a..50abb6f2362 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 ecd82f18d32..3b606c89e7e 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 c6ac9bef47f..14502303fec 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 39a2e9ca32d..700e5a78bbf 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 73046ca69df..46a3a6d7cac 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 1e8a2820faa..80b64ff9ee3 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 004ade41b00..93d73ad0757 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 23b83276499..fb659956a99 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 8681eb91638..e492a52f243 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 7e3a180aa87..29e6ef480df 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 09f45dee59d..894ac18b1d1 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 aadb3aa1b50..b8ba501741c 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 6d8216a40f5..9aad3901a18 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 ee6a29d22d7..a307f3585f2 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 8b7d83f93de..67a3b05e234 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 010bf6f6f95..5b7214a141a 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 8b760bd621c..c6a0802ec31 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 1ed75419d68..6cb10af427a 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 89b2c4a9f28..b41dee1cb71 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 02ca7be1900..c331f8a5506 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 c9a6b09307c..a27b3f5195f 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 1b583de9f93..212e2ef4ea0 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 4ba88625294..fe659d1d4eb 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 799108d739e..b6fd45ee5dc 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 fe867368da0..a5460acdec1 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 4db6465ecc2..4bbc526704f 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 f54d7de3a78..afe26029bea 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 8c2e2eefafb..c90203e491b 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 3a0acfdd8cb..f94378a1a1f 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 343113607dc..9ad99c01b4d 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 ad67d14d267..462cbe91304 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 d83bdf2e2b9..a565db413b1 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 075a4d892d6..60215fda391 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 41a080b5b0c..4753cbb7d36 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 4321fc6d24c..9fd59d231d1 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 3373cf967ca..6ba6abf32b6 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 9cd4a4e43c1..d4ac5f52ac2 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 cd7502f133a..876307f7b8b 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 1e885a57ff5..162b3a9b711 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 e134aaecf64..18ca8f10581 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 ce387f8c30e..16bb748d38c 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 94e4a40e0fb..82bca69f9d7 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 643e0b978bd..e09744beac8 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 18f7cc7a0a1..9946560db07 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 a0a6cf00ffa..0685c670fb7 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 bc4cd9a8742..0af1b567356 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 42ed593d4e2..e2fe51c077f 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 47e3d1eaed5..5294a4c5412 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 d09b1c2dcca..efb70f3dc0e 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 701f84c04e0..8ef0b74165b 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 6196cc9bf85..53c59172685 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 db92e2cc259..e84fca60a55 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 3a64de5c163..42ae49396b6 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 144738c7957..f27724bbdc9 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 12bf22d96c4..27b7068b927 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 95b06d26ee6..d92a7d4a4de 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 983f9a04e58..b29a76f8003 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 8023362f586..318ec6f4c0b 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 b585e5ab665..fce0de2290b 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 70eb69c23eb..1a7f753ded0 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 8545b8ded85..33dfe67c1e8 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 a7493d083b0..af80edc9a6e 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 7f6fa6f5b1a..0ead83056ad 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 81149627f74..cfa9ab758e9 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 eb0a77242fa..201a9626d4b 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 50d84447a89..6fac307f9e2 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 559090a1dec..59ff89e603f 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 3d53c63dd5b..b68f441d70d 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 be8503cc3db..02931ea8355 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 a3d7ce3b93d..2c9c9f8db0d 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 43e9ed4b5a6..efa61c343d7 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 d991d35a6e4..d37758dad97 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 ad27d3ad3e2..64dac54dfaf 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 2ac30fd47d9..1014b2ef184 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 9b77810add1..65e73dc3af4 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 983f9a04e58..b29a76f8003 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 7e5f192acac..e6f454fb74c 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 ae854b998d5..c8894a9755e 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 5ae165ec28d..ead4f2a809f 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 b4385665649..52521c15f3f 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 8e4395068c1..1ff6ba25971 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 6682debb1b6..4c6019dbb3b 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 1bc0820cb61..2b458c3ee6b 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 b650934f400..02efbb6b95e 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 2de5695abeb..c17d9e4407e 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 28f3948043f..523da179fac 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 a6faa3f14d8..ad2c79e816b 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 59bc4de65b6..dcf40da1b34 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 b610258cffe..2064c016371 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 b48c3f85978..d39ac289623 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 59f974c3866..b7f3d79ed77 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 15cd9b41214..76eedc6d1a9 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 72e1a3c0877..c55b53ad879 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 ea06274741b..5b900762ce2 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 89f547c020c..ea7b8c543ea 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 479f876b19d..021055a5243 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 88d2f7ead71..945024dafda 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 161a1ef8366..c859a4a60db 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 93640da1c07..4e924cd78f2 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 723a59944b1..86dd8cca5a5 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 a33c7160fdb..a9d8f8ad02e 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 7916a4a73e7..e85f76e0d20 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 872e3a5ed54..110e4219804 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 3bea9ca23a0..81e875aa04f 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 cc653a07574..bf68c9e8d81 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 866ac1c9d90..d90d68fb987 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 8bfa4a609eb..1ad2087b222 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 15c9309cb7b..c0ab18c0438 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 396d5d32523..e4551a9867f 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 91f6ff528af..b992a9f4eb2 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 3f602f11d10..97c7948904e 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 cdbedbb2eda..de8cff458a9 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 06e3700550b..ceb86497516 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 308433eb8b7..1806f74c546 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 bab78d2ce74..15f46cb1da9 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 88ec79d8f25..09d216d1643 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 d174da02947..e3a69e31c20 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 7dbece68871..8e90de1379f 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 190cdb6e744..975ec9bdb80 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 d5201213ef7..677be341827 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 7d42fc834b5..ed51f7adcfc 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 2306415fb33..ba4ff03d599 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 954ff007c87..25f2f26fece 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 f51fc1928ea..ca9914a4a5d 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 cb0c43a865b..95ee540af21 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 2e70c881529..421e0ffa0db 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 417bceced48..4e40fc05df9 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 50bf4200c46..baae12c3470 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 7a7f9935d77..7af55fb3230 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 44658219f9a..eaab98d1ea5 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 558f329ca7a..306b124f135 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 27a29e5475a..49dc9067cf2 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 3b2e5541e78..12711d6c8d2 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 de1168676e6..da69c0e0016 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 f74aa85e525..e234300c812 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 d4a92053eae..30fc9aeb7af 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 e8c2be240ac..1b03b689d8f 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 983f9a04e58..b29a76f8003 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 39cb5160b53..23f37754be3 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 4c7bc9e5b80..09efe3cf5a0 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 03be35b82fe..5aff24e2676 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 e6af82b2c15..0a921e8b75f 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 ed3331c762f..b8764a16e5f 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 1ea15849651..1d18331d0a1 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 324e8d7e18d..6af7ad09ddc 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 bab6052d76c..5a7cc442d67 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 a28d088f2ea..c727de5d41c 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 6cd9f4b93cd..040f0045ebc 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 84a8d96b948..f5634ac2ba4 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 c26c2fedb8c..d3f7e88708c 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 41c904576a8..5bcb36254b1 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 983f9a04e58..b29a76f8003 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 a75d5e38dbf..6ba250fd3ca 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 c9512eb1232..efff32aad9c 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 ac63fdd6b8f..3f14998bdac 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 4d6d1aa2587..13680ae5019 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 b955bb7dd43..9cc13e6a8f8 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 ce03de4321c..359c5441df9 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 4727886e3ec..7e53dc80c84 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 60e0278326f..597860bbeb1 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 f364d50daae..e7a81d14374 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 52779f59bc4..8c47d2db5f4 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 acf08888c7c..c92cf0e02eb 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 2a86381e706..6ad4904f982 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 615def6da44..e9da331f380 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 6fda571b1ed..affcb0640ad 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 6e24a08ea9f..3bd3d30bb0d 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 c0588894063..8b19b19dff4 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 c9fd40128b6..92ed06d7761 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 99d11a4341f..641543d1fe3 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 52779f59bc4..8c47d2db5f4 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 e091625e3ab..507cc973ff8 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 77b0b003430..a4007154750 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 c07c9706498..0957139a447 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 52779f59bc4..8c47d2db5f4 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 bf7b62c1a75..415de0704de 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 354f6a730a4..54a0cf6ed50 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 df5c5213633..ff9c92bdd7e 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 6026c0dbbb9..9b57e2a3538 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 b8de48c7164..4ec9a73a4e0 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 52779f59bc4..8c47d2db5f4 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 548c33de84f..e990a7e94e4 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 9590845b86d..95e8ee89a71 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 b75f7e5d146..5a54c6ce505 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 67de5030d0a..42827f1d1e2 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 eb7db691187..19d9f830362 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 d9e0366e33d..4153e9bd95a 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 2e64d1ed5f6..34dacfefbcc 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 ea79ee51054..356d18edccf 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 b95df1031f8..df86998dd26 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 4db777e8f68..4a440f5c49d 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 36221c5c5da..33b7dfad410 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 ac85e997c6b..2284738afa0 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 49f934fef6d..0ac60998008 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 af0c3149ee9..81360e8e48d 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 3f6b2e946d0..4330acacaac 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 aa19e3b3b38..e86b02e5809 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 0f979934535..f2fc7c3cddb 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 ef4dd8794fa..cd623e9c894 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 b169b04cb88..7fd127802c4 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 52ef25e76dd..f8d9473c641 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 ce7e423c07e..96c9726762f 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 98a3ce40a16..30f95333928 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 7938e32a63c..2f9a0c704d5 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 4f5ad3e47fe..c1e1103f417 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 c89c320a51d..0d6f5c23b96 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 aff97855055..c3781e0694d 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 30d6bed1def..f19e3938602 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 1458314ff10..4831cf91b6e 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 afb277bcfd3..5950cefb009 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 a8fef0830fa..b5ba1dad342 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 ad37185c095..3499decc3f0 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 2d4dd0b1338..7139348c8ca 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 0ab362ab2e7..4cd0c0fd97e 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 654921c23d3..7b672905939 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 0d22803a688..02e19423a18 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 11809bb1850..752434bdeef 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 ed5e756e81d..cb14650d440 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 104a8c5ca39..caef15eee8b 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 0bbbca65a18..67a3017b69d 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 82bbc4aad12..50f917190ee 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 66c911af79f..68ec1114888 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 41d4adef7bb..42fc892e624 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 c6368eac214..d0b727677f7 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 e8e2d72beca..30e1f22c9f3 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 5ffda40399d..9ff0ff28645 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 0fd134fec68..333374cbc68 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 6e9c7e7277c..513488afb76 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 be84ada4341..d7e02533cb0 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 1e895f54ee7..bd33b358bac 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 4d8eccd0158..b554784aac5 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 662684d39bb..d46609be6c3 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 9d1675d888c..0f1293e0824 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 12c5b5c0461..852321ca8bb 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 e9830f4d3eb..b1f9eb21a94 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 d96292ff303..2dfba7998e4 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 7991ec162f6..e32893d41ec 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 fb8e2887187..e0457ed2baa 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 5f91ca042ea..2ec1fda26e8 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 60b51bb036a..c2f8822b109 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 1288b9e8303..72eeb022265 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 c22ff8cb0d3..966ffa35030 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 2c47be974c5..91b8c24b026 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 8fdc2dad1eb..3172154e1bb 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 643bdc8875b..21c8efdc0f9 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 a26964bbd78..407d37451f2 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 775cd5d8633..eebd4421ca5 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 69b5ee5dec5..d576bfb09bc 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 2df493ed372..664cc5ab019 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 70ffee536bf..afd7112dfe8 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 701f84c04e0..8ef0b74165b 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 d3528a7a121..e93553ed196 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 3c45a58fe23..07f0c95b35a 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 3382cb77027..9abec015720 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 9d396fc441f..c56162551d0 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 533cd8b44c9..0604b8e7028 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 66f8bab1081..c04103aa7c1 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 983f9a04e58..b29a76f8003 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 de62e0132fd..661b14f5223 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 3bc26253267..f5c8591e9d4 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 ff296cf8ecd..52b3258af20 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 ab92c4fc0e4..1fa0e5247cd 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 8844599f39f..f8ca20225be 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 46397ee8c26..517e1fa6910 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 19cd704f546..548bb790ed9 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 77bb6877685..bdc9b4f37d5 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 08ff3be1fbc..7d82ccfc106 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 559090a1dec..59ff89e603f 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 f6d66f15754..c4623bb9cd4 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 921cf3da874..a74f531bd84 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 8ebeff5eeff..91173b2177e 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 f810dbf4f22..339c6acdc30 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 b31129cdff2..aba8b0f3df5 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 ad27d3ad3e2..64dac54dfaf 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 0b5745a9ebb..93d4cc7a740 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 7055f4b2913..13b3374af27 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 983f9a04e58..b29a76f8003 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 5bd4f83a4b9..01d38f4322b 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 f8681f0c228..3dfe86f3d8c 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 9e0f7ad6429..8f1cf4223d6 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 bb869fc4423..860404e7783 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 f77a0536f2f..83f5a8fec99 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 cec38e95200..93912305302 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 df0e0ed4abe..4ae83e4a14a 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 911bdf5b7c8..a5a0e98d743 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 d7e6c9a44ae..78d9e784e70 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 b95df1031f8..df86998dd26 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 35e17654d66..4f101e17bdc 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 d35a13f0061..1d82995cce2 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 80142732ec1..afba5f96769 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 96993ff2e46..cffa92f0a64 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 9f58f65ad40..cac95ca4bbf 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 18d06322fbe..d3d87c2f6a4 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 bee1b8f6eab..8dbb256bf00 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 72e85695940..f587b7ac60b 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 995fa472d5a..252beb5eccd 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 93e6cb7fa11..30851152752 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 5f205f9a25e..4f01757c3ef 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 e92ab3ec3c3..14effc73b2b 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 d75a6752a14..7f50fca276e 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 6159b11f839..4d563bee16b 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 934c0e8d826..48972bb743a 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 0968766135c..7f9b246031b 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 328611453f2..ebf2195a4de 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 98055a2ef86..c209b391cf2 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 7912d25c731..ad4844b4220 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 0e605aa6ec7..700c1102377 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 e2bae9b38ad..07f181d8e95 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 08b2814496d..116a2c9e77e 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 c4851f5514b..971af478bb1 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 c370a8d09be..ff9938aabe3 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 6cf74d5e2a4..f918eae61e9 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 85218a8458e..707766aa4c9 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 426c3e74547..5cb8d2da448 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 c1def79a76a..a62cc7d1b06 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 90ed455473c..bb00dc03b09 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 0af44ef746a..514f6a5c083 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 1a730b6b701..fb45ab26bf4 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 cd37d59e56c..f98b0e2dc22 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 1a98730f034..c8d419662ba 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 23fcca0c7c0..58a9dd5a7fd 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 a6d322f34b1..85ce7741f7c 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 8bbfd0abe87..8c8ed5f4980 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 7b39781fe75..7359b35f61e 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 6977b786af0..23096b15561 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 029ab1e9fef..0a5c36c67c8 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 613c2ce073f..5ab41f1c542 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 18a4482686b..24e83593c86 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 ffdca526bcb..a5e1ade954e 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 39b4aa9958d..b2691b5c9ee 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 e2138d8c924..cc9c19c9c3d 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 8a436ee58f6..4a56e37a420 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 d8c1c1f854f..a74d6548b1e 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 c66562d236d..93efcedd08b 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 1d440dc9467..c53b213b431 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 ec5afa18ece..7d333838020 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 a1dcfc29958..08d5bd14522 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 10c4fac7c78..d803a7c9ee9 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 e3ade261b1f..f50e174fd0f 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 36c4563ae69..0d68a2f320a 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 41ebb25bbb6..6c4b612ea25 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 c8558802c51..81f932c9662 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 7819d0926c8..769970951fe 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 2b9d992a7e2..3959e55ccd3 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 8aab452f509..1e8b871f86b 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 328a982b1b1..2cd632194e9 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 450707ecced..c764c3e7eb5 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 701f84c04e0..8ef0b74165b 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 692ec59a06a..8d418594e42 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 a52d49af996..5ee5605f91a 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 3401ab5a4dc..5941b4473e2 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 d2b561d72b6..c36383d8ad9 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 bd2c861282e..bb0ed22ac25 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 215fdc4265b..23aeabe2685 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 983f9a04e58..b29a76f8003 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 67b773201cb..ada95876622 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 d9432ca5c91..1f5b586ad30 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 81c534a6072..ee58bae0821 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 87849204b64..2040fc5b366 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 ba86022d986..5cc7799edf4 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 d1379bab29b..47c13ef907f 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 54f24bb0b59..5cf60edbbed 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 e90f59e2f3a..c1f0b0048c5 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 57efc948f40..fca8fc200a7 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 559090a1dec..59ff89e603f 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 35e3ef66a9d..eded80987c9 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 983003da7ed..1a7b4c10b7a 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 8c97ec0f7ee..bd8e791ea89 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 b97fb9a8ce7..074bd08d476 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 8fc7371a443..625108254a7 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 ad27d3ad3e2..64dac54dfaf 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 a4c692da423..c5ccb3e7ea7 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 784410bc7ff..38cb91ca695 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 983f9a04e58..b29a76f8003 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 6a066d49973..e82b0c0bb16 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 10b8fe1e661..6294c9c52a1 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 4c5324029d1..25b86e0c420 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 e4bb87e0011..5cd014be0ec 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 47bdf06b435..1f4a262f80c 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 fce897ed71d..0db13722300 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 51955d77b1f..619f2a502d9 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 f88fe591ecb..aeeb7f74e07 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 5b6b1e677c3..dd1afde9706 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 b95df1031f8..df86998dd26 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 eaae6e6ca26..8efa9383e0d 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 22dce4ccea0..385f965bb85 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 175376d186d..aaffd662fd2 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 8be4e10a5fb..56fd071e3c0 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 d5a4b71cd91..af0b8e50639 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 e422240b9c8..488e0440c03 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 1c0cd084f8e..6e3815b4ad1 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 6c94587d012..cf1a535bc1c 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 5a948d0492e..d9c9032d9fe 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 89e315e8f04..fb466199a35 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 e8bbf49a8c5..0cf0303af3f 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 5fd52c934c0..73621c3a781 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 02c21e998af..85315b80a04 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 463268407b2..ca3736427c7 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 5dd991fdbfa..6875ea4f195 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 1be41448164..875b503ea21 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 f6d6c342d22..c00ad0e1515 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 c8be55290dd..2f5bda71597 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 6b9b9627169..8ce7cb033dc 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 cf4db2fa5e3..18773dc242c 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 4b32e6729cb..ca378487da2 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 5c9e5d8e1e8..b4a19ca96e7 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 aa1962a35c7..403afd9efbd 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 780a6e43154..32cc31a085c 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 e867ec19d88..b0d679f37ef 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 8f890c2773e..eba201e8667 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 030facc6771..88c1cc53740 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 d13ae1e0b8a..d4ff019e4ab 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 1d45c4b2d2c..ef3dc715b8c 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 aa6e577f821..faad15354d7 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 5ea1e336d26..35f86cab343 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 e292804247b..26641bf28e0 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 4e0b81e2aaa..c86f0b10732 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 1bb83aaf0a4..64b6d4b8f5d 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 d261adede3b..6fbacf2767b 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 a258a227840..b86414cd233 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 75dd93b89f4..ad46645e99e 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 a39460d2f34..04a7ffc4184 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 bb72dee36ca..34f74bb027d 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 78dbd886752..130a91ffc28 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 e5c2bd902ea..010e069518a 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 bf83b2adbae..2e2c735170b 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 8c3751b6fda..d2d6d9887f4 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 cabfab02ced..d2098ec1653 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 947f1266a29..cfd8e5a10cd 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 c690bd8ff30..bcaee50432c 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 7d233945865..5e0df4d5b9a 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 7a96f855f6a..3e97b3f60e3 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 bacbee8c651..fe332a8c8e5 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 0f243e03eba..fd78dd97f8e 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 7dba15af5e2..8a1ef0d9f6c 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 b58eb462d93..5b6eee67f6c 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 8d515fb082d..ed8bf093f71 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 308e2e74f3b..386ef16c403 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 79d137210b2..a2e464a8302 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 e804f360792..d9a06b02e9c 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 9aeded29ea5..d4c4b65438e 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 2aafd057969..d5bda3b26b2 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 2bab5882ca6..f80da1b3e43 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 16a92ed2324..95a85196f3c 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 701f84c04e0..8ef0b74165b 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 541dcbabf32..52dbcb2d2fc 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 b40caa3fca2..4e6f17d7323 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 c2d3401cbdf..5fead26b1c7 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 dee1f42fb06..f7566e55db9 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 56d5dc856f8..a6db7291412 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 b031c37761a..92c03b58a6f 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 983f9a04e58..b29a76f8003 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 194e31b1300..a77c22b28f4 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 48c2c5d6514..9a7a201b7e4 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 456f9608c57..e91b15d0f2e 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 3b208f7465c..0480976dcaf 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 ff74fdfadef..69b04e7faf5 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 dc8a3c505b1..b6f9da7ad36 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 93e2e011686..7a164733190 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 04d25b96952..7ff5eb7fee7 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 983d728c8de..659fbd76ff0 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 559090a1dec..59ff89e603f 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 6e7dc019798..6bb10f5a9db 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 0e22fdb56ef..3e249689881 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 074c9a5ea62..96d64099442 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 593e5039982..c9db0e3b563 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 871839b71de..b6eefda93c4 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 ad27d3ad3e2..64dac54dfaf 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 237e25c699c..2b9bf8e58ea 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 9bce25eb576..8075f032c78 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 983f9a04e58..b29a76f8003 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 b01b06906f2..b5e11b026ad 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 4fe68626249..ed98ce39e2f 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 8df8198bb5d..9538ac5a22f 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 75f1b0b210a..84f2addf430 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 ccb49275e6c..491f8b3ccd9 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 9ee0415c4ec..26e64086cdb 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 ca9c8fd5047..940bdd692cf 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 46bb41ce405..551f576202f 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 765126c7a5a..a203184f62b 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 12ba4f55b40..a2df1a2c23b 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 7017d95469e..b1d44db8665 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 3074c4fa66d..9aeb8b0f5a6 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 08c319d99b6..f10e06e2fb5 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 abcd9692922..32dc331d352 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 fd8a09d6fbc..d17d8ac0c40 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 28262664c52..611be0fff98 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 9287c41e40b..6e99f2da22b 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 87a0d634bfa..4c7847b1ebe 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 7a4be8fba36..d9eabd177b1 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 fbff6d5394a..db4d37455cb 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 f576b5505cd..10ef98d0e85 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 38ceef30be8..462c4a742fa 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 cff41466517..c5140ef758d 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 8a054d845db..01d53940a2d 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 29a6efd8073..61959a07ad3 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 e32fd424f5e..9bf33b662f6 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 aefa39690c2..3bc8d16933b 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 755527aff7b..f5c3c1240a8 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 22a32493e37..9810e138042 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 2454afa5c1c..8f852386633 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 adb9c069c95..650fad27e83 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 7775d370e57..aaa0edff5e8 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 b4f3b595e3c..d683ada462c 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 2c45f89665f..424d30e6dd6 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 63f93c783d7..7cba3eecd57 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 28eec2d678e..916c47a1822 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 89c4904bb2e..5f867ecaf0b 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 75b7910340a..c89caac5a96 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 085f21db04c..d45b2692d80 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 19f44342b59..4281f53d6ec 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 754e1772c90..280428dff9a 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 2d332f12986..3afdca81e72 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 d1df4657b1e..d3514d604e9 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 80fd2fdbf82..c53ad95a9bc 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 465a8a0e816..391b3bc4ffb 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 1c9642e6a67..e03fabe59a9 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 fddaad3ac47..9f072211d69 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 b7d6f51a7d2..179cbdf37d7 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 02aaa138e78..ea4cc2621bd 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 d6ba286da8e..63d8ff4980a 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 065f9868b58..e0a09c2c4ca 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 34f9ead7a99..2041d0bf0a1 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 85f933f59a5..ff84cf8848d 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 ea5d94af0c3..7a5aa68c120 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 a7b28a1d2d3..636a5f9a928 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 47c142afd16..3c8335b8a38 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 3cad26d1028..fc13d5ca225 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 d362c4151c2..5d9d1e0dbee 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 8659ab0e61d..bc4beacb2f9 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 c6a5f99963d..215b669f842 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 a6868456d44..f212217b662 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 dadd7669ad6..c2750f0a91e 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 59b00bfe988..d05f9981e40 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 6934194a779..8d3b4fb1dea 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 4201b92d679..c2968e10617 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 76a0eb74394..e4c2eea7b8c 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 2ce86e0fff9..87b99f7a75e 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 d5da6312aa0..90c57d9469a 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 983f9a04e58..b29a76f8003 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 aad3e1590cb..766d17c78c5 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 63cb58e9fe2..2d0c1e50d37 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 cd5e2f84305..f4b208cc940 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 bf1c8415b0d..d6e3fa5295e 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 4635de948ef..bd0a8111abb 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 a65bd892bdf..ae8ab915e48 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 d4cb7f787dc..e9097f83d49 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 9234bfbb1d3..4b5d6c75fca 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 ec82a919e0f..c1538401eee 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 ad27d3ad3e2..64dac54dfaf 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 b3b2e55070c..f5e643ef901 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 8161016e954..a5ba3329164 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 983f9a04e58..b29a76f8003 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 bb0fc5affa7..959505ea676 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 3aa7ed94f8b..49d9ece1689 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 5e784eb6efe..01284cc6093 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 61ed7e48d6d..76664da7f6b 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 c0e5adc6ec0..8ad6ad244d6 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 ce6d3daacbb..812dcfd8826 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 3a57aa9de3d..fd062584c57 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 40f9c358113..1207944f6a4 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 f55a2e319be..e030a600d94 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 cff41466517..c5140ef758d 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 c1075a2715c..9ec92302502 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 86b5e089a8d..9056409fca2 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 98613739275..144bdd77ac8 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 54bb79b340a..707979274ff 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 ee6b622d715..5ebe98d1709 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 f7f3a57a3ae..f263ffe8dc5 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 dc714273417..562f77c1bd6 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 7df82b57a0d..66cbde0158c 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 af1c7e54b36..03df1fc5f01 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 2dccc62d5fc..df426b1c312 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 25c97ddaf86..deca928758e 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 4c32d579e05..17106e83eb0 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 66c638d1286..ab27ce92932 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 adba18a6a03..0de6a775d32 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 3989f9f3509..f1cd4206450 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 d80669a0170..80e23c6766e 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 9eff359b833..fe5bdd2b696 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 c2f6b1f0c7d..001329262b4 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 7db9a9067d0..ff2be4ffd58 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 3581c3028cf..0fcb12f1a18 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 de63d0a57cd..f1afbd09de5 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 f23e5c15e3e..271207183b8 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 dd5261b97ba..353eb7eb5fa 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 b91186fad37..c5b1a4fe625 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 c65f3a28f5f..f54cb70bb50 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 878baf15eec..7602bbe2313 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 95248eb93c6..2ba81d118e0 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 59e60fb6eab..65e7cc295a5 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 7d45ab0ca0f..4bf8b638e80 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 386030113e5..146eed6c682 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 244808499b1..f1ecbe3fcb9 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 14734e394d5..836241e5fec 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 1999b6fad5f..835194e6467 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 43cde0777bf..d59f5a9d115 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 e1e9ef0aaa9..9d57a5e9dc8 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 983f9a04e58..b29a76f8003 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 d4f39799a74..ddb4be5c5ff 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 6d3d9b14bdd..a4d81e1f25a 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 659c9723dc4..ec5d16a3576 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 d6d1431e84e..7b66efa6b4f 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 bd4d814ca22..3adf4c7b3b6 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 caf3ed8a5c0..9ba0f34750a 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 9c47d0720fb..76157637997 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 d8c6e8896cd..d97860066a4 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 01192ea148b..f2f1eeff490 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 983f9a04e58..b29a76f8003 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 a06e2039c1a..31c165909ef 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 f787aff2195..a800e8e1d98 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 b74ca1010cc..be2d1989355 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 f9f8047333a..efbba4d3079 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 f47cb9f63b1..7e25e5e28a6 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 2bef10c36bf..f0a50289da1 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 f3c9a13b3a5..326fd050797 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 958738d6d7e..86cbc06abcf 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 89787f49472..114bacd7ba7 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 04e64dbc5ee..4189bfbe1fd 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 db7707de5d4..20e4b66f768 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 a22bd4e56ca..972629cb9d0 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 93b43971023..e0c59ebaf3d 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 1da3e539cce..a77a0c90aa6 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 8abecadfbd8..945d93ed7fe 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 8a4af5719f5..b6993cf795f 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 9253f7afe19..9649ef4ddca 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 fc68a652505..14a137d5b4a 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 e15d2131917..3a8527e1a9e 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 4ca1bf01554..5823c62d305 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 9faef2901e4..1f28f9f63b8 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 fa77517e27a..101880aa307 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 447d96fbf8d..d7076ddd0d5 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 7d9860a84d8..817ac2685ac 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 9dbb57cb487..ad72a3b54be 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 6a9adbdeed6..bd1b6e6a011 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 afc951432ff..efd64716485 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 ddc3d8d1bfb..594dce590a5 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 d2623eda7eb..b443d2ddb4f 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 64ea5f94072..02e922d4320 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 16367a1d47a..5eb8986d7ca 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 67de5030d0a..42827f1d1e2 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 2b7b61b1940..7c037414a52 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 87674164ffe..d597870fee2 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 7a7b727601d..1f2066edba4 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 8b7fb032d78..3e03effdfe9 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 6cb6e2eb065..73c1cf501bf 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 bebbef22096..9dc36852596 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 c4b00bb21e5..a76e1830192 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 81af5c4040f..a6d843d6a46 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 add49d4eae3..9eab81f325c 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 56971fa3a2b..9b463ded871 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 4c03b1e0dd6..0b50e5826d3 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 ba4a9623d9f..04e9f741498 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 2f32347c898..c16dfce1d8f 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 42c7a7fe350..3558e24e2c8 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 5979082bc3d..b16fbee3385 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 89035731f39..1e191c10cff 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 cadd9f57939..2d9d30c669b 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 008a21981b1..b3b61e7b977 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 499911991f2..375c32d8b99 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 476444cce4f..58dc1aad38b 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 0822a7e61a4..2f7d14f28a9 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 73fb995b82f..8ed14a1bcc5 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 02e68c798d3..07f032953a4 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 ee51f0b3e2e..8196b19ff32 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 7dba258e370..a2838502926 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 bdd207293a8..0e748d56132 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 0780e13a735..50b78a4015a 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 56b36ac9cd8..9caa922280b 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 29f47d4fc5a..9bb10519397 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 e4c74b3cd3c..19d5063018e 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 983f9a04e58..b29a76f8003 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 faa650ef730..35b525a6f84 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 44d5056bde9..97d37e49751 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 ca54eaa8837..ad2a9b37238 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 1b4ebb40f6f..0684a3ca5a0 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 3c65941605d..0f98ae3b30d 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 af8bc324dd8..e49f0e9ce7b 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 16312ea64e5..fc145765197 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 173511e7a29..8e4118737c2 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 d643e1d9afe..509a392816f 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 d70a1c4234c..47f058f74e1 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 462acdffd21..0bbec6d4538 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 b1ad35ff0eb..cb903d7c6fb 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 a5a842d5a6e..929876a964b 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 ce891b907dd..51db887308b 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 4aba26587d5..c55b3391206 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 65d48cbc8ca..9f30fbd6b9d 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 d2d2c919440..4b0e3468436 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 2adec9a47bb..73cb0939ce2 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 ceb2a97bd4d..e7abd31a0b5 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 915cdb91d7e..12960ff72cc 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 366aac83fa1..802cf3f4cb0 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 7e2626ee95d..afa3d7b234f 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 f0a1ba9b6de..76cb4a957cf 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 3cbc26e428e..2433cd66fa7 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 2181306f875..9815f4ea48b 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 ab7b7d09e0a..45079eb528b 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 bde9e4a3b49..3a1b632b676 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 73c64d3de54..d4a4d7aaf73 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 2cae60d7687..83945ad7488 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 c60c12ac882..e9387ede61a 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 1ad45e19f1b..3b2e198549b 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 4f2459f4a84..e596e5d30fe 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 7e36de1809e..989fef03dcb 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 a9f701c4208..832f6f42bff 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 cc044ab6a28..586e421b4b6 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 32b2fd001b9..02a3c8d2606 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 177c1fb4304..eb0192465d6 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 983f9a04e58..b29a76f8003 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 daf36ae190f..3b5a505369a 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 ee5cc26d80e..c8ade3c0885 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 ce957617e99..334b21d83d4 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 1b62faee872..9c7c926f1b3 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 8a8487ca2e2..2e8c9a753b2 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 903724edead..71892ab0c0a 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 3e030c575dc..303237b824c 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 ceed82e406f..c618f87b6c9 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 53a242f2182..8ade3865914 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 bba1136f42a..6252409e26b 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 a18bd8de060..1d1aa7adb5e 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 f0ff4de14fa..5834a638071 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 da0ae909741..e81f0e08134 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 b91930642e8..1b7bf66f0be 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 ae424bf2f72..837d448e6a7 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 803d299448a..826cc5566b0 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 f2686900288..32c5d038f18 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 ff93e03085f..2c2108cbb84 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 4253a3d925a..74190d7a337 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 fe8deba541c..a9f7226d1d3 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 882279d4949..05f83139efa 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 73df86f08fa..61467bd6910 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 47905d5ad49..1418451f4f2 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 b40e0292b60..73fdadaae3f 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 98a867b5d01..902fc3dc883 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 6ea6762697e..4aaa29395ab 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 1cdd39d3e1b..3bf06468e20 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 5b0ee95af9f..01958a69fd6 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 2c49e30cf7a..ee3e88cf087 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 fa3bdbb9f6f..014fe906da7 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 b783a77b4c2..7dff4b4b7f6 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 1d68a410ea9..6ae348a4df7 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 f57765ae6d3..697bd4d31e5 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 7eaa9a942c2..45d0a84c553 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 c1328703f3a..2b9f5386c7e 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 b595eb2d8dd..661b9dc2446 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 ddc72e9c773..36eed00f792 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 75f7c0cc6d2..5df26c9ed1e 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 a92aeeb7e3c..f64f4898ca7 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 603adc5606e..d58ca280884 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 42a39f75a43..7caf00b2abe 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 c2b7664948f..8089c75ec23 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 caf23cc1dea..06a1350d975 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 810402aeb3d..3665e3cd8ca 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 eb44a656722..38df3251602 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 55e5277eaae..c52276c88ba 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 b4400120ad4..cfcdd4579bd 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 73eab73344d..9662c6ee27d 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 970f59110d4..b81e103673e 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 77b17da4671..a9e2ca3f89a 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 6520a3c51c5..d36b54d4d2a 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 c62fc952030..585999c5c9d 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 1902e1ffbf1..6d646c1305f 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 b259a256922..b86d38e3de3 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 60e8790ca1b..a75f5d629d4 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 bf8323566bc..19d40be7b22 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 3277668fe8b..86cf613ac56 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 c2e5a490956..d4e2b9ff155 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 70e380417ce..a2f1bc9eb45 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 91f6842f529..93fafc4f122 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 b7edcfc7b11..810b2aabdae 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 eb599180631..3aefb277054 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 6c9d35db381..64f6fa3154a 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 bcae070c7ec..14d75147112 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 622aa8704c2..664cb379f00 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 3f4b3206706..dca06194d55 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 f44ac4681cd..3e71b6ab631 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 b2abda08e5f..7cea5013eb7 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 6d8e2f30efa..401a411615e 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 2c0e5b4689c..ff1d77e0b20 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 0fafe618243..5f18e869867 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 15bccd0d20b..cb0ad2fa315 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 49c81600d68..7d1cb0b1a09 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 a34627991cf..14701736999 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 a371f2748c0..79fefc5d2c1 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 f8df3bd1aa2..5737a371c70 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 3b9263932f3..3efcf98b28c 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 7443bdc1ac7..a4c3e75e40e 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 28772929927..e57501a2532 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 04353659902..ae9ac2bb775 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 796a86d565a..76bbef4a296 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 34a01018a98..a032355088d 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 b8f48ee73e5..6fe4c4b7ccd 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 8196fac9a26..a36ffd16182 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 9fe2cfd30d8..edc7be49f60 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 73db08e248f..60a3cfd95ed 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 d427c7e5dfa..454ca6bc6ef 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 d76eb03791a..2fd52e03488 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 b48e7e1fa9f..e42aed624bf 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 c0c3794e70c..74e26a43d14 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 69621fa0415..53fe014d8c6 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 86d7a8ed13f..41ab43b9b6d 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 3aa8d005dee..a72dbfb7f71 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 34595ae574c..8354ad360e3 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 c315fbcc754..ae2c0f5282e 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 3d2a1bc7d48..19ef8f29092 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 5d506740e04..eced291e626 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 9bca349a355..66170ee6bd6 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 f25670c3e4b..5ef6861acf2 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 5659106df10..c12c6de6ed4 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 9157d944f1e..e6eaf75803b 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 f28c8e99b92..8ae4bbfa02b 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 4f988fcd290..583884d0e39 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 c97a73a27e7..4dd813e8ea2 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 5dbe280eb5a..7e1afcbaba9 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 cc3248e0d7e..cc65c485068 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 7bd6da09b92..9f1e75c69a4 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 dc7329e0889..bac07e767fe 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 e9950719a6d..9d6a8d8c94f 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 b1c59bdeb92..c6233637d52 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 0024dfcd5f9..22e4fd806d9 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 f9b44f3c61a..c85f83334fa 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 983f9a04e58..b29a76f8003 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 15864fee5f7..216aeee370d 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 17257e3d7df..02c05bd489d 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 c621ac133eb..e0a36be3e6d 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 2911253ae05..e3fca8df50c 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 3c3f5193b41..d061f35cfa7 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 d438c2f75a9..8da25a8aa58 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 6b7f8795428..dba9914aa95 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 b780f65fd43..538ce719293 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 e1b3be89d25..aa2e8d77e95 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 559090a1dec..59ff89e603f 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 0c8a5e4d2ad..18ec3b3c5b7 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 047be9cbc9c..1b6d16329c9 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 cad40679c17..d52d57c0965 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 60672120fbe..8bcc1bf8bc7 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 a9c601c8d59..08ec78ee698 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 ad27d3ad3e2..64dac54dfaf 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 9e6cc35483a..f7d4e21deac 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 6771e130e18..460197d26ff 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 983f9a04e58..b29a76f8003 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 d34a02e65c5..2f26c97e4ab 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 6a2cb30306d..4147b2d977a 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 2323013343c..96982f1dc56 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 754b2ad638e..90cd6c4eb80 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 4f95af68bcb..dcbc6b2bfb8 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 dba515e6175..c4d36985200 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 eea25995355..5227f2689d6 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 7c30d1dad69..dfb47b84f93 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 629b98dc8e4..1bf03218af2 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 0fafe618243..5f18e869867 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 81f4118614b..0393cc801a4 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 cc8e71bc7b1..7d88a5d0bd1 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 7a8833f6dc5..8f6980a3b4f 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 4b8e97783d1..3bbdd09cc08 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 5212538f670..4019a7147fc 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 546c2891cef..bf5fa3bd840 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 6bfd37b2264..d21e9dcd60a 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 d76024f8e02..fe5e5a408f7 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 e18dcf19e50..919f2616479 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 1db6adbb3a6..4a2db059fe0 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 2ae4c65cbd3..52e1eca5fea 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 90ec0786385..1e6d8e66117 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 142086b3e57..a72a6b9b49c 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 23c4d8d345a..25c972d928b 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 f3512096d9a..5d6eaa79029 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 445dd5f5ec9..2b4d869efd0 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 a02196bbf83..f01fb245b8b 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 7b86bb76b5c..1e21d495363 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 922f00c49e5..9196c98f89b 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 6f57deed79c..beee076add1 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 633a125f7eb..f01ceb2bbc2 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 011aad01bc3..97471690623 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 9bf3e01ffa1..f6eb1dd78bd 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 7352b2e57cb..02ede5ee57d 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 dc9f1d74da5..7ea79062f78 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 4944fcb3c1e..3e92cd1c4c3 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 4e5064d76bc..b97feb9da69 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 345d97a8597..7f81a412969 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 d51c479b625..adf68a5726a 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 be3d81e24e9..712b779c4b1 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 4049721008f..97f7b6c9975 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 4f9a8faec67..1d983c90caa 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 9b2e433d7a0..f760bac8df0 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 e65decd24c6..7a022087351 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 ee294edb738..bd1ba1d138e 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 4ba97c3b0ad..feebc112ff9 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 eb508a95051..3e4d7928c0c 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 3d36fade33c..6e9bbe064ba 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 fb2186d69ef..bc8f4a6accd 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 aa188ea51cc..65f5288fad6 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 6dd2a8ff666..07a50233736 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 983f9a04e58..b29a76f8003 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 1c8db02dcd9..cec424e444b 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 02eb706aba3..0fc766ea59a 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 64936830139..be0ba1af647 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 dafe10d05d8..b27ebd249fb 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 04bbe0731a7..832757b086d 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 0768a24db45..8ce2bbabb2c 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 f5e71e0ee89..079ecc76466 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 7fabe78bffd..0bd40186892 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 cf72a5d20b0..6e8d8722435 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 559090a1dec..59ff89e603f 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 b60aceedcc6..4b5880f25f0 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 edd5f951d53..d0294d56b47 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 8eea5666393..4f76d3eace7 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 6307cc6a8b1..d1c5f5c9ee3 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 80b6df39bd5..77ba0037444 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 ad27d3ad3e2..64dac54dfaf 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 f7424b2798f..7222e7ff291 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 9d4dd5118af..3c8b1d113ca 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 983f9a04e58..b29a76f8003 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 c819cc912e4..4e4e222492e 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 f5e6eddaab4..acb73694718 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 621d852b3b7..f938dc9e1d0 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 40062e44c30..127ae7035ef 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 565cfb63605..a42d115f6b6 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 168d5658ae9..bfbfa599310 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 2cfa5b44adf..478738c9dd5 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 5c420d3a061..c6a757a2d4c 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 076b993189e..8ae29acd815 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 0fafe618243..5f18e869867 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 445c83b07f2..3a899f3f567 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 5b31a874b9c..cd23a121fc8 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 5fe6734daee..4943da7c4b0 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 444f930ba97..e4cbc075270 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 6336c362d29..f1f81d527a9 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 77178201e29..32ec24e1347 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 df67ce269e5..96a4ad35646 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 5211c225ce9..a111dc4f067 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 71472ff37b4..90aac193d3a 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 c21fd97b6ca..6b838d18d5e 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 f2f88f69bce..45008e27459 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 19ca2f04be9..9eab5128218 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 b9b0b50d5f3..56c31c4d855 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 5c5b0fc32ed..25873043387 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 58113c40db7..525f5998ef4 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 89d668e881a..0cde9802189 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 4d3d8f4e91d..11b737d3558 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 c8e4d1cb7a9..b001be67d0c 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 4149cd6027e..06584b42de1 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 1c214423d78..94074609887 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 77db3984711..0778052b5ec 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 698fa9479c8..4162ccbf3fb 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 9572f41751a..de2527e41dd 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 0b2ede38d67..7022bce1945 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 4095c0366c9..8da5c6a2b09 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 5c19bf57ae0..9c41c00940a 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 42fc6530d91..1650e149b83 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 2b0e2415fca..5fb49a21d76 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 bbcb7a847a5..9b45da3617d 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 0216e825f04..2a756f3b9ee 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 f83c3d11996..38d8dbb7d5e 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 1d4ac5e86b4..30f431e7a09 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 aaf601c9b88..1fe79c56084 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 e8424811357..72e96a57817 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 92f428cfd73..45206464387 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 5ecdfb7003d..5df59d96bbc 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 986ff5e3978..2af5715b62e 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 bb08253cfab..f71c73ad64d 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 4e1ecd81e36..6e5b2ab7f5b 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 ce6321ecf13..0124c6e48f9 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 830d7e213c7..df9d5e252bb 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 983f9a04e58..b29a76f8003 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 81b7dcb5461..9230691cccf 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 4b4461e3d3a..6e077fd6a93 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 4961449b6c4..6796badcfdf 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 1b4b69acd82..c950b3c9c03 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 8bcddbdd0f6..a1d859d0f73 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 5ded3c244a5..3ab4ccec280 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 acda7aaaaa8..49ec8a342db 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 fc3e0983713..96d858a9e1e 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 f5bbc61a07e..4401d6dd84c 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 559090a1dec..59ff89e603f 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 985e7edc3af..5b185eeba98 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 1102a0996e3..06422fda073 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 3a6ff074067..da1e857b29d 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 dc4c665fc9c..6aff149b4d5 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 80fced51dd7..4b07f978a73 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 ad27d3ad3e2..64dac54dfaf 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 fb15481211f..ff05045770b 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 706481313ce..412d37342d7 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 983f9a04e58..b29a76f8003 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 cba638198b1..bdefbf0ab9e 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 4962500a293..3b8eed4041f 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 163f871f732..dd8e8969732 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 732dd3eda07..290211bcfdc 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 a104f3fd7ce..d1ce5ba320d 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 af8ea85e861..7a5019c6337 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 99fb0d1804d..e81ef782400 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 0db41f3296f..9d9c87d0974 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 48593222507..2dd2a3889dc 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 67de5030d0a..42827f1d1e2 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 2a69c44e313..4c8005c5241 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 2322246b721..03755d8355c 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 2ec412e51d7..b4bc3d48dd1 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 0d45bc53a45..a914087a334 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 ff0523d6807..d5874a9ef9c 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 54acf090f01..fdd94ad13ba 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 748bf7a20df..fefce8e66dc 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 4a2ecbc678a..ab0fa37f0f6 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 b74d1474cb8..9474629684d 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 306c672976e..8153a4ac0bc 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 72f5e357b86..58edcbaa957 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 8d1cd362b57..f84e6f6c261 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 e1ce968ed4c..74208535748 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 9a184bfae81..eaabe9ff7af 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 3a2e60fd155..6cd3c60ebab 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 3e9523fe0db..14efbbf3bf2 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 983f9a04e58..b29a76f8003 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 e5c8c451c14..4846323afde 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 33803083d53..208c2eff4f9 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 bbbbea590f2..13e4ee42fa1 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 309cddd429c..38c5d93f757 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 e53e199f324..f75efbaacc6 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 881f04c4998..af9da5c0180 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 2d01a361ebf..3b6de86f04a 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 0aab05197a9..d28307838f1 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 4a05d3ac7a3..87074b192ea 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 04e64dbc5ee..4189bfbe1fd 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 fff09d801b1..525d628b48b 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 75a1a7e2ad0..4f02c203e82 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 afa1a1fe5ed..cb7405b67e1 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 53a3f666e46..1cbc27e969e 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 ad27d3ad3e2..64dac54dfaf 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 7c6da318c8a..ab73db7c829 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 9b10ca7c2ac..52c86e56b79 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 983f9a04e58..b29a76f8003 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 60e321f2e9d..c1b694e74a6 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 a5ce0803f21..c5db0f36001 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 ec92d350f17..457a34322ba 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 4587620448d..9ede1ad0a43 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 a43ed1d68c6..831fd16e8e3 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 7515f8df6fb..c0a1ce9ecb2 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 e857836cf12..6a726ad0e27 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 5ae59c2fc69..f8667ef4f6b 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 dfc8934c05f..62ca3c4f23f 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 07de6dadaf7..df8f606b1b0 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 7c46ce987ff..9629c4333c4 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 ccad9edea2e..55fbd6af88f 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 c2bac1855cb..2c8fffd3eb4 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 8ddff597fe3..b6bb5dfdb98 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 69c37d35525..9a685864655 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 85b70ef0824..60d506e091e 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 cedac6271e8..4136881a29a 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 8bca3ec41eb..00874fc997d 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 3344dbb1b73..3df2da4aa20 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 97bdb33b758..e0aade8ff07 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 11e0852edce..7f602f0cb71 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 fe7839c7569..6e03309cc97 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 6f2e43ff415..f51978f7247 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 c1a469b5c5e..5f9adc5d6ba 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 54980bf31c3..da550108dd0 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 7564825f1c5..3733b832dec 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 35ab1f298b9..144ffdfeaf2 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 baa47a05160..c8e28e68f92 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 b0358faa4ce..57f59d8d927 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 a6716a7d646..41ea7a590d1 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 d225cbf1170..37facb0f31e 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 bc619b4f3f2..9bce6a8511f 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 3bd91bff1aa..62a2eccb71b 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 3d0d153064f..8b2d00549c8 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 97a132c9824..ba117273702 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 e0a90a88c06..de38de558ab 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 2fc9ff2adbb..ee52f9af67d 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 eaae9d8a9eb..1e1cb9b0202 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 67b6bdf8863..5754663ed6c 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 29fc32253f3..2770f1ceac2 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 b1d7c69e8b4..eeb20ff6eab 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 ecd6c0f05b7..d057627eec5 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 7e6485fb2dc..cedcd1fe385 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 0f6fd75ab30..9c3ad2d5d89 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 983f9a04e58..b29a76f8003 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 e8f47add9e8..efb7e3ca05e 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 764f8449972..d22965acb25 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 4cb5e3b5f96..f9241e82113 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 396b59fa410..df61c20cb37 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 bc266124c2f..99c563a3a79 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 4e8ee7939a2..dd4aff72027 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 3045b5de856..329f26f94f5 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 f7721474f0c..c94ea3e9ea0 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 4eba4995989..d11e7f22294 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 04e64dbc5ee..4189bfbe1fd 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 3c45fd96c42..bda69417ff6 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 ec9dc3d1511..4ba4a1836f3 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 d0a68cd52ac..99b2a7e458c 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 7b32734bad4..548ec011a97 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 be5a049045c..ce48cf9b143 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 00a1af05f8b..e746b5d446e 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 1cd1a656570..15d8df16e91 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 c703dee9e64..b766c13b6f2 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 08d6a22712c..ca34ddd995d 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 6162a927202..5c16a7caec1 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 5862fc718f3..8b16111f7e4 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 c4fbd692583..66ea16963d0 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 5aa4088c1c1..cb21f38e50b 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 c7c6d8c06b8..4c47e60413e 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 c914afc6f42..382abac2294 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 69f981c130d..01dd172e752 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 f8bab252bd1..328dcbf5933 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 30cb202148d..c218ae9edfb 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 3a828151e9a..769ad8409c0 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 081e530ef40..32d7192c20b 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 ba770de97f9..9a553fd2519 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 ae40ad3aef1..154b0eadcf1 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 6b460fe80ef..4d0f807dfb1 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 41f2a3adda7..3491d811855 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 c1b4110e115..61458d4dfc2 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 db0cb6e9912..aeecf04a9f8 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 5ca0e2299d5..d937a858853 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 4bbc9ec44a2..bf13adecdc9 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 ef193da2e1b..7d0b773a105 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 57fdd4dafb1..8d8f8345f9e 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 ae2f8e0794f..4e802734f88 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 b8023922023..bf6ecf1a7eb 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 f4c65428635..280f189e3a6 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 2add8daf216..0489795e829 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 4f824b82480..cbfcc716704 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 ef05c31304c..8a376296b8f 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 780cb19030c..4fd231751d7 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 5fdb4da1d56..874be15ade2 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 892e576cb1e..eea679d68c7 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 6cb18239e22..032d439e846 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 fc009e719b3..f22a351273b 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 87072a3cc72..2b9050c646f 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 cf7e4d01564..9c4a0885c1e 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 4f1a4af57e9..619eb3f44bb 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 1936458ac21..333c0816dd3 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 826220881fc..7c87621296c 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 1bacb9302b5..251eb4f3947 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 1c25c169e12..e8b2a17e6da 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 48819032c3f..f9873108265 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 5526bcb07e7..450385bf622 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 ca4e2f062fe..3633b17f4f2 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 8b8b543795c..47814bc0b42 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 18227f25155..8bb2b8ee8f2 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 ace8a2e854a..ce622d87509 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 e1d2f6544fe..6413772cf8b 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 44f0c8a5c4d..38d2365c886 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 0b85d7fc67c..392705818f9 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 bc95ebc6066..c73c0da4b0b 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 96c550923af..d6908dd039e 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 5ab9c2be12a..05f86e83d0a 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 caae434677a..1031f4ed9bc 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 b2a425bbe12..1f1ed55c3ed 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 c94b047b9a3..932177afaee 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 780256b842d..cd0de2dad01 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 949ac5ec8d3..de813136749 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 bbd05ba561e..cfef4cb9b48 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 a1886c8ba93..b9a288b6679 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 14dbd0c63ff..787337a1885 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 0b33a612496..a39f9da25b3 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 5d8e98a10e9..b16b465e556 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 1c3b8633a84..97e82b9afba 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 3278895dafd..2a7d1d52494 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 4078bd028b9..15a00d4cad0 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 0154c702c63..f1c58f09ce7 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 18be892bd2e..b9b10773ab2 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 e496d5b845f..0445b754449 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 b8d3b26b471..7f415c56645 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 6ae55bbe6ae..7e31d767af6 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 1a8d1e71253..ae0ce6e18c2 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 ac382245296..a11e0e44f58 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 3c1979618ff..6250af7172c 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 b9db01540eb..aacf3923f6a 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 97e94856c16..e55845b52a8 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 21023d64a73..878556b951e 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 889b931b99f..f045e18e90a 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 69ad94efe8c..1437f108818 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 2c6f73f837a..5a11bac8a99 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 db0a5c55b59..94789114b98 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 c0061daf686..1051752b31b 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 e7dc511535f..67bc76b100b 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 da6d1332ec8..71a9eb09862 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 ffa67b3dd81..bd22fb86dc4 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 bb76bbb65e7..30a89a343a0 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 da99dc386a7..c45fcdee61a 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 ae8d5b0b9d2..9a1acfa4f34 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 132f401b5a9..5f67d6bf82f 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 276c0ecf04c..3f154544ba0 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 840204575bb..9ae1690566d 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 701f84c04e0..8ef0b74165b 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 341fe48e6e4..7b70099143f 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 22e728fc3a9..24bb76eb569 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 31737bfd642..449862f3462 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 593e7937cf2..739683f66d3 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 cc1c3aa1e62..c5326cc5ce9 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 4faf5cfbe1e..3c2722c2486 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 27860a82b88..50b85221656 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 92aef5224f1..a796f49d324 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 0fe85bc1b42..c0832b24669 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 49893ff1574..86d074989a5 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 a98c793affc..cb58834b9ed 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 80a947aa434..024d94e5a80 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 424abbbd264..2a449801477 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 f2413c1c9c3..c5c6ffd42d6 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 fc4ec184b02..b9fdfed25a4 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 588224dc0ff..37ed16bea7d 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 fc6889ba1f8..5418682f4dd 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 7009ebfa56b..6aac4173877 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 c31a4883aa5..596d3a4ffb8 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 c5d999431bf..492cbfb1fa3 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 11b3a3474d3..1521c7a696a 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 03883658535..4cd89140b8f 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 f2c40b9a5f9..e590db6981b 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 e89216a4c6d..e3acd85a066 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 760a704ccee..65407a9c41f 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 6605d7797da..07e8dfb65f7 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 d906cd22283..1734ed91bfb 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 894188d860c..6edfc1c2ff3 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 ff932107fe7..90f48795232 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 4e2ef7c7f34..42354defa58 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 729edd111bc..e1686453541 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 1f3dc0061db..db68f35971d 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 8a2c804a446..c1a267240f7 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 8a6d64055c0..23207cde454 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 4d40da0f35c..2956f618d77 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 cdc25142158..0875a75b311 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 4a64548f3b8..9b92e67bbbb 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 ec87ff4ec4d..5349292d53f 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 12d987a9ca1..1696e804229 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 c2f82545b18..001a98bfdc5 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 c2fd1b1c3f3..4a513488702 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 e1c0f4935b0..d3899f8d8db 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 50e76b682db..ac076088f8f 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 c479be13a0c..a36f24be1dc 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 591edfaf8c7..e52dbcd5430 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 7dbb9c668a0..2624849ab73 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 de4f7e2a182..9ac0486b6c5 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 5183664e405..599819e16fb 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 78a9036a9a3..e03a5b179e4 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 a03aca5f1c5..d101731f3f6 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 983f9a04e58..b29a76f8003 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 307d3b721a6..d82bda8ca41 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 60c48fb067f..1c28db0eb25 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 3ca2ab2dc39..b5bdd1d3b25 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 3e761bf6b36..e3da2bb81e6 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 7b5fa3ba2f2..5c482bec2a1 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 b65be360c2e..32dddd84b03 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 40d4338b03a..09c01b01c80 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 b168211778f..879f6ba7f6e 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 a4330623f5c..b642e4396ff 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 b772996f42c..56f0806302b 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 0acbff9a6cc..8bc9ce1003f 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 1cd68f9387d..e69da7c4b25 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 30858da33ac..a03bd7610cb 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 a3d04dc3c72..e3dfec2dbb1 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 dd49692a9ee..df77598b26f 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 9269e949e96..c3f06f6afb5 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 7c5b31be38e..6a02c1b1793 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 f35578845c0..f41fe5d0756 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 4f27a744de8..d0f62faf82e 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 c2b532b3169..575797f1a5c 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 94e1436d59c..dac6b198a1f 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 983f9a04e58..b29a76f8003 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 8d6016f51ad..6deaf46435a 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 4de3925644b..cf983a8fd26 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 9c7d66c749f..69ef55d25ae 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 73842a444f6..80021699e3c 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 283c2a8d4c5..b21505946d0 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 8ce3ab49426..3c594ec2118 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 fbc4a9661c5..76a198088fd 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 463befa4a62..17d1117bd89 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 cb10a0db54a..15f43db3ccc 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 559090a1dec..59ff89e603f 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 3c0d740eeb6..7af1a21ae74 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 26bc2468e09..f84e824d35f 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 b1624dc31ec..022c01fb288 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 7d5b9b9ad20..e535fff4c16 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 4957a991124..23d54d2a72d 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 e8ad96b4dc9..a0bd5d5de8d 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 adf321ba949..bc01a3d5672 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 318cbf58140..51ab26f6559 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 d1d6cb26336..f84d50058cd 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 983f9a04e58..b29a76f8003 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 27d5b3f65cb..7aad79c2d39 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 573bb79c430..37701463d35 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 dcd1591043e..e4628553812 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 56d9e973918..0be64024d00 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 5f371bf2ddc..b151286081f 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 2e2874af04d..f07c1abf973 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 fb504d1ac5e..029c3e5c70d 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 34333db56d2..4cfc6a8549d 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 864d90a61ab..410e0697c53 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 b081aee460c..6dfe4972b24 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 b74acd57464..b41660b0282 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 e299ba46ec5..cfe78a43ac5 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 2f737d42381..c100d836324 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 88e5afd59e8..8379b07bf1e 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 f2f8638cd11..24f0d4d7995 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 261fb45dcb3..38c9bd321e6 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 11d2b3fd859..8ac6fb83b34 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 9643eb40681..089c31f06dc 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 b398ef550cf..8ec27eb2fa7 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 2ab8a854336..b9fb0911876 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 63a43b72673..7a517285803 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 8b20ab6faff..16d54de7f34 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 889a504e341..d6aa46f7e49 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 4146c7da74f..865f496ed51 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 6f9dd0b0059..832871c1826 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 afe396f0d8b..7a1c4892f4b 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 7d8be496ed6..40d45815f50 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 ae707f355aa..6543c61ec8c 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 1122a6fcf51..caae5dcd264 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 f9b65aab565..9d68e39620d 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 75de9acaa15..f6191706354 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 3bfd34783b5..9e1565d8cf7 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 a9a9f16e68a..a4bd3531593 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 7281c178da4..607a067ce7f 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 23873102a42..945a4439517 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 0dd665dd744..be384ef6473 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 dda4eb090f2..0c786573f52 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 f5adc30c6d6..6d8284fc23b 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 d62ec494121..6a99602ec4f 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 85b53647212..245e56586b2 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 be24ce40aa1..caae26fa56f 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 098c842966a..4a00ff03c91 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 b1e7145399f..2d6653b215d 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 b0b20ae6bb1..d62ac57da15 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 66eec2e3c40..776c2db9fd7 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 a9bc214f04e..00277e5a714 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 ba0c49c039d..0b3384f68d3 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 86b438df67a..d5b145b0f10 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 0ce610d21cf..d8ed4286339 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 4672f81a047..99a0814d983 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 0f78ac34f3b..36e30f2c444 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 e59e360ee40..ec28ca19a7a 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 241db369387..7bc1837c07b 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 341aa62a965..1cf67666aa3 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 77ec9350d9e..c48a7a7a2e1 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 cdfc87bc25b..f49472b1a74 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 af3e6d03aed..866cf2b90b9 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 207e2ed444d..61c57f20b41 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 ccc3013ec4e..84bd13940ed 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 9161f56824a..db8ccc06b0c 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 bcdefbd81d4..58456c69ada 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 5b26ea3f3c4..6cbb57dd4a8 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 0b540282e45..1371d4e871a 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 70e20229b14..f879ca881cf 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 95d7c48ec5e..0710ba6c5a0 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 87580b7e716..8fa4269ada2 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 8f2ae4012d1..f24342b67ce 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 0ba05a888aa..2cfcd00df9e 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 6fdf975858f..e994c893cab 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 c5e28fefc54..58dc6bcba03 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 7b324c3a0eb..00921312f89 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 ba701e15cb5..a9a81dd2218 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 1e13c351b56..2173e548617 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 e55d0167a89..b5a8a2fa1a8 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 fa8214a043b..7e558bbab8d 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 4a6942dd16e..4b0bb0d9b9f 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 1aff114f02f..70f26891910 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 6f3df29d1b7..65363600c0d 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 0d0c77a6f75..fabd4a16e7a 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 164d49f56aa..d9db02fe15d 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 ff2bf9766c2..66c3d446b66 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 2f49aee90e6..9f631ce45e6 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 bbef76d1768..dd35e480cda 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 c46e83562a3..e3a83c643ff 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 683d7825f22..8fc955efa00 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 38cde5b2872..a441b47a7f5 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 a75c20cfa3b..fe23f9aa238 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 452a8fd8854..ab4f3d0ecde 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 19830c8a90f..c4c43073086 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 9a1ac3649cf..63146453db8 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 6bc108ff66b..3db97b6298a 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 92468316953..f1ff0712a2a 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 c79b304ba46..181b1d14a43 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 e5e641835fa..ca0786da626 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 8cf431ca460..8ce61d064c8 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 2810f164149..421e2f05f9a 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 ef6734d219c..5b7697973d5 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 18796c814c1..692d2dffd3c 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 8a336770762..b37f0e24342 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 59a07a109ad..74b01043131 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 94a1455e930..86a0401636c 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 bc75f094426..2df95adef2a 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 8b1f12a3b98..9f274b38671 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 701f84c04e0..8ef0b74165b 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 2ff2ca46b47..f86e6bafda7 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 4f7df433a45..63750d8488e 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 8dcd1d2a1ee..5cb164a4c39 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 a9bd9fe0b2d..f1e2a9e9c58 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 0059a1dba34..a7f4bfe5b33 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 8008d2f5c22..54cb82e958a 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 27860a82b88..50b85221656 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 c1753b0a6a6..7dcb427046b 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 308f17541ca..03df83bf92b 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 1ca8429bf73..7f538513446 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 b4988e01eee..1c7faebb267 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 e9178e0b78e..f5cc0abf8e5 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 de9af918673..9655ce7c2a6 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 113d05e3977..c08fc7669e7 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 15c4dfe893f..9ccc5aafa38 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 6ef5436ee10..6891b1e1184 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 8ea6d4d4763..b15206ce0a4 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 dcc5ba5a158..f799faec18c 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 9c3e7850f8d..5349bbaf7f9 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 9b16c27d734..f961768cc7a 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 7d12597cad8..96f8b79641b 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 03883658535..4cd89140b8f 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 6caf9a64b5a..6d320aa1045 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 85f07445749..df35f3d1d85 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 a302a7f1c9c..fc9a7d13f00 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 347ac646ad3..f5f1eadb3ea 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 331317d2e5b..be6d3122fd2 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 00318042eb3..d8d8b7ce6fa 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 c1076708fb5..43482296785 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 983f9a04e58..b29a76f8003 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 d3e70c57f22..e352930b2c9 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 d311526674e..2476d260359 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 99dc6725df0..ecf7e5b132b 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 dd3c38dd7b3..24947f77666 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 6bd11497ef5..8708303be1d 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 360946af755..d4df82fa3ad 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 d4564daee73..1a0ba7b7dab 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 b704344df0b..8c87aa4b79b 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 6fc4b64ad26..f88e02be9a2 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 559090a1dec..59ff89e603f 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 abf1131c097..1b728a65f02 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 8d7ce57f4b6..34dce9239e1 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 d0280b3ba70..b64e8b3732b 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 7d930dab93e..21747596ffa 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 0a43d801476..15b343e5bff 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 e8ad96b4dc9..a0bd5d5de8d 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 16ba168ff83..be67f0b2346 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 eff34897c65..47a5c243788 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 f90a0adfb2a..72f4725f556 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 983f9a04e58..b29a76f8003 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 b1bb5b4af0e..5616a496c24 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 3a5ed8d4aa4..7194e6deade 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 7b89c32f788..4a56dbee6c5 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 85e4a71a08d..525fe7f3f2c 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 d7992ca800b..e8e24403ff2 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 3aa7a6db5e7..a36db56917d 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 0cf33560fce..a87de77c25d 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 573b5411590..5b78fc50ad0 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 c02757ac8ec..bdfd2715bb1 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 fc0281e8973..959d3c13f78 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 64a586ec842..d7a6ac4a618 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 dd8347a9755..ec71faf9c04 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 7bd3f6f3966..f38d0c1cf20 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 ebf2d12c7f6..c298f3fa34e 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 6b857eb388d..c038878512f 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 a7558840e37..dbe3bc9daf4 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 cf703588bd5..796e6b93bde 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 d9824c77dce..bb04a4e7936 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 1d305d725eb..93c230696a7 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 ca974324888..11e82f154ee 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 c7d2905e08e..2bbe2efe5b4 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 a908fd5ee1a..aea391a74e8 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 f98d7e6b55f..8f9a8285cc2 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 b0a030f2dc4..7621eb30a82 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 7d6a091f023..39ca46169b3 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 dbe10eb6997..f5aafa41151 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 549112ce24e..0192ce33d19 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 b290e223325..f87405a831a 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 a0381f5769b..2ec2780fd71 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 c0c1e22c98a..926823804fa 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 f77974ac35e..76cdf24fa0c 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 d55be7aec88..378b8ae99f5 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 09be0546e44..02337f1f55a 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 134ee5f4216..3c058024e15 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 a0903808b91..1166d1239e7 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 0f938d46799..4bed43a4f53 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 e0f3a1647bf..554f206ed01 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 5073ec38100..92f1498f21c 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 c67df2a3694..041fa0f7bd3 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 c507ac4f25f..df304ecd209 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 2a85c26fefd..c430f3f547c 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 12c5c89ab9b..8f68274db51 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 5e8a69313ca..948ad1dc466 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 264348e3403..aa58e968a98 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 ada524dd00b..85686b53d3e 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 bbef4ace315..1ba45b059fa 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 98c9c6260b4..c18f4f19a8a 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 92d48623ee6..c5074a8f4ab 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 219fe32f127..6a4764cf048 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 f7bf80c1a00..d1e1fcb7f98 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 2d16ba1cf8c..ffaf272eee3 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 4cbac015f65..d92d1358e64 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 a5dd042af7f..2599884a2d0 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 48c4086d603..7da0ab485c2 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 fe3be2e4d5f..146c8c684d0 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 7e7a9817480..8220301017b 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 87a6a3b31f2..093d1b742b9 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 c6118838a3a..dbf7d27af06 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 03958c8272d..b439a7907d8 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 524d89beb47..2b0de4e59d9 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 a4514361246..63ad5a64f78 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 40db8163332..6afe38189c0 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 3a697c55e12..13f27881ee6 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 b6c0fc41bfc..ed375635641 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 a01d04509e7..244e7226bc1 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 c4d866eb247..965ec88db53 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 2a364caa7c2..ff6fbc7128f 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 8e560dc8cd0..31a4d2c3307 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 73acdb050cc..5e16210bfcc 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 a1189ac7718..fbfa75185c3 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 a9b1f072d7c..b46f3177765 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 9f0e33c9681..aa62ce2b755 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 547a6c72dcf..333103f105a 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 5cc69441f45..07096aa3803 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 e3406c19321..65d66cdc203 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 c48d7007c3d..54b1e8ba507 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 bdce7b2b350..83f87939307 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 1e6047057e2..87d8d9b1bb2 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 fb79539b1df..5d90944900a 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 9ec9082ecf3..803682d1d03 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 84963a2c1b3..abd0778e606 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 6c578e40979..4d5aac16299 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 6a90a357d80..2b84d33f6b1 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 d8b97390be3..6e7f9c75e53 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 3a094369842..65333269a56 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 126fc58c6b7..36461c9b3db 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 d102600a507..fbd475cfcf1 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 352c951d7ab..90559fadd5a 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 4afff8033e3..f82908bfe63 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 8e85b921cc4..e7592a60743 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 28bcc81a458..a460c2d201b 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 ed0ed312210..6285771510a 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 5d1a5475792..42d4bc98c7a 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 fcf2832edf3..7f31202384c 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 7d590138124..b72afbbd026 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 c0c8c71f8b2..feebeef8c4a 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 095f1d7e1cd..b3ae6e637fe 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 0e04c2eaaa6..4648650f08c 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 01c08f3d729..4bb21120c1b 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 4f5b4ac5107..de6478d0d55 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 2d79d18d536..517ce584eeb 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 4fe4143067e..ed6951d4e9a 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 1a0c0043b8c..904160fa758 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 2bb17e502c9..a6306dcf4d7 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 294afe9563c..bc58dc00133 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 dfffc664239..590ad5a3170 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 e7287e3b326..79a83378214 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 d0fbcb8e56f..57933b0d45e 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 5ccaf2969c0..26201eff873 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 cd9e75fe3b0..aa29c8cdbd9 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 a04073019c0..4086d278c6d 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 fd202c3df1c..0f40b16ed77 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 a10a575ef24..fd4aeb5dfad 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 93809e0807a..9fc5b1c7361 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 394edf64da6..482b7010b4e 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 4f3a0e86789..f8b4ef9c6d9 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 07881b488c9..2cda7c52124 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 6f175f2bc04..3bc8be04c3d 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 73c49f26ce4..1487e0edf3a 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 6d5f809a7d4..d827bdce7ba 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 8bd49e07780..e9014b511d9 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 fe7375c376c..4e92288c63a 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 44bb8c33876..6a8809e39c7 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 13a12efb451..317f0e298c0 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 72599df24be..4faeecdd3fd 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 4bb7015f835..bb3fd248a74 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 8d1d774aa77..81f37492733 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 71c4498d78a..e1f918287d3 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 7287f8f6de4..cf718c68a4a 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 d43f94780e8..7550909e972 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 983f9a04e58..b29a76f8003 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 59844b4c838..d2fe43f3b2b 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 3385b258c82..f92d2c34c73 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 76bcfe1b7a2..7ba739b4d79 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 31070d3017c..15941251b8b 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 432c1bfa6c2..0853cb121eb 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 ea3f21e26ea..fade32cbc7b 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 0dcb8be5568..ec4f313828e 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 46d77e006a7..f30a35a1dca 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 12db86faa7e..173e42805b2 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 559090a1dec..59ff89e603f 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 3bb31f785ba..ec7f8767494 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 26cb57def07..04ff2d2c1e7 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 cd1368ebbbc..a7ad88ddddf 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 00b6f041a26..1fd413d9f28 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 ff420cd3a76..7c655320539 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 1aae6a91aa5..d5af3ccb3ad 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 e22394dba86..dd03953b652 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 dd268347fbd..aab3ff48a4a 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 1e909db4d7b..c256cdf44f5 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 983f9a04e58..b29a76f8003 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 f8b7ecbcdd9..4fe5f34f08d 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 a3513443e98..2a71d9502a8 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 0b1eab2efb0..173ae806722 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 e695824e37f..73300506278 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 86f9d48012c..5310712525b 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 801faa8d11c..2f899a8b0d4 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 b89153f3f18..fa0a5f5c9e4 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 0193cbf41c1..1562bcdddd9 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 283e1574319..8b94c79ef46 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 8d51b1d4c02..1a1cc3031d5 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 deb30ad2cf9..78495642276 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 c72bca0b0d6..bee6abb0d30 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 c802091da0a..0043c96ddbf 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 c6ee8b59679..bd6ede58821 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 68b77db4493..b092e8554df 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 2c47097ded8..616f9792a37 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 53294c715f1..2c3fe4a24a2 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 c0db8126f16..8e1077245b8 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 0a78a291073..19057d3127a 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 e90b8275975..0e6f66079b7 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 feccc71542a..418948e5f73 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 1e3d1023cec..aeda3439bfb 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 99c62351f85..e742e9c98fb 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 487c2f8676e..3dc491e0895 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 f0294f2720d..8229486b67a 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 259b05e89b4..951cf3aa177 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 1686bb8da7d..f94266e1a89 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 c3dc8b5b1cd..d6a3a60aca4 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 d8e6a684159..80e479f79d9 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 6a4520f92d6..83a05aa074d 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 517c4858a0b..00245651b89 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 5154851b8ea..08f24aa9b02 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 ab968fb69df..fc437e9fff6 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 cadd6f52bb5..e01412d2e2a 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 579c39d7a8a..36f0b6790e9 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 3c1d3b2454b..be81713fc6b 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 870b59c2364..4f15b445210 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 da0b4d89781..cecc6e1d7f3 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 c8ea2d7f353..104caa5d802 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 dda2acbfd67..544b12aebc0 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 887832e5cdc..c8ec9dca594 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 3a308f1a6bb..a327a5c21ee 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 ad27d3ad3e2..64dac54dfaf 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 846e0f7c514..dce846f7121 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 5ce1b70d583..6913d33fec0 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 983f9a04e58..b29a76f8003 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 117b25134bc..1470a04de69 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 79bfe78e93c..666baf32204 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 c71e4d8a81b..e76b4cf0f41 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 5bfc135c02f..5f4c86b9bc2 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 b0c6a9d2439..3ca556fbc4a 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 cd89b20f225..4ca7f032f90 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 7462e94d200..bbfd8120e9e 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 c0f1be19da7..b884aa3f3a2 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 e15028aad3b..59619e6b638 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 028351f35d6..1f11e1b86fc 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 769de352b70..c48b0c2ee80 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 127bee655eb..3aa3d529395 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 111cfb31a5a..17dd516781d 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 b80d4539ea9..c08eedb7c51 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 81e2fbf26e2..7e605bfa7db 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 5de8e034dad..19a2b6dcce9 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 1b34819b4ab..085adb56624 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 52779f59bc4..8c47d2db5f4 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 5005071f76a..f06ae81810a 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 3e9c8b58b28..1f409f1ff30 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 886e1e997ac..50d3c035091 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 a6c0eed7630..47382823127 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 7fff7ac574f..2ec8e8090d7 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 e69cb6fd2ab..029ff60b3c6 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 1a42406dad5..5204a700899 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 db559093b44..aa85796b144 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 2771f53cd34..fce7fc688e8 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 3f41e79e0ca..3987f7421b3 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 ee03e1cecdc..51a2524ed91 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 c381e50479b..4069dd4c592 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 a5479d72cc4..9b187b08865 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 f20ed3abf41..2211ea4c762 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 92546609750..b1c45822461 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 72a5b7f29b1..340bea11dc9 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 5282edd55cc..d7fdb6d2551 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 2661378f5dc..8421b7bb66f 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 eceaef417db..0ab50555dfe 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 8aa15d6bc33..0ad4174708a 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 87560b854a3..35ad2d8a921 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 cb264e90c59..481bbb44b68 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 9a781df3fb3..ae88570fcdd 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 384e89c7f3f..6c50a5023b2 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 ce6838a648d..6771fd34d28 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 14de6bd00b2..34b09c4c653 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 f56dd212cb2..307e671b05d 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 9a21f90b7e6..03511597e24 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 4cd11320cef..c8e2e62a6fe 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 8f6f1f7579e..d5106abc8ec 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 6c202a044e1..446b2cb3a8e 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 ca6abf77b0e..1e9466354ff 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 02483d32219..0976b69192d 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 e6bd77598ae..9123b88342d 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 6f24d8ee900..43aea5552f2 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 3ff8022c53d..ea654ef42a7 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 fa0ceaef672..ad3feaaa0c3 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 6ae29267b1b..7e0431f4bc2 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 86c0b2c3104..95d5a69b94b 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 755cea4df91..683781cf3eb 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 0e67a0e0841..cecdf008db5 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 46e86c700b4..0b8908b9e72 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 49f0605fc4c..95eab9e1097 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 6e995793cf6..f1dd46da435 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 11b73c8a811..09d90fc58c0 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 0a2f55f8fa6..ac9ea947f5a 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 f9c35cdccd4..d4dd82791e3 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 f28fd4fe9c7..b12f1d43d60 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 6799e6862e7..e99abad95ee 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 5d5c1db7e95..17713d1f8d9 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 af448df0ecf..8e6acd1fef8 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 1b7c457c28e..6dbb76a9d01 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 64d3311b0ba..bd9f56db292 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 1cf93cf0908..1f206b7b854 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 417dd867101..fdb06fc4c82 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 b3ad7f3450d..d92f800643d 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 90c7f7b1276..f7acb5b172b 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 49c9834417f..5e7be939d5d 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 cff41466517..c5140ef758d 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 c5210d83e1b..bedf6e31b47 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 31d708295f0..d0da5238e79 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 b7bf0fcc758..2fe2dd6cb0c 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 5504c36e76f..f4773f7cdd5 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 bc7eda954cc..67f862b32b4 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 ec375c561a9..dc1241f205e 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 9a75cdeb06e..1ddcb9b6d32 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 6b45c48e53f..7fd5729f475 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 911d1748cfa..dcc66827e8d 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 aad3319a425..f9df3bad492 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 95c54cc6255..5344c2d46ed 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 7f9c1d44b3f..75cf067e41d 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 dae5da745c1..da07cc52a2d 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 fec36fbc9dd..19d147d54b1 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 487c2f8676e..3dc491e0895 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 651f3962ff3..72c337a159a 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 ea45957a5be..9a694ab31d8 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 069e3ad65e6..8550acc8162 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 bcca06d0137..f07e40e62fb 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 f714945af2e..8954d122111 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 8295e4fb8f9..e28daf392e4 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 9dcd6678692..0fd4c835d02 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 245a43baa50..4564d936e83 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 ee715c44861..42e4f495aff 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 d55cf9b11b3..1a59d4b6ee1 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 dc163fa92d0..e6557ecb0be 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 bb8b5b3d4dc..12cad89ddf2 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 13dbb512846..79fb0c96509 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 71eefd3592c..2d0b18bd6fc 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 69018236188..8db7fc1bba5 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 532e222dd80..af340fca3f0 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 f539a52bcb2..d2b8f972771 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 4a7af52e77e..129dec86702 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 90c7f7b1276..f7acb5b172b 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 2ed0a29d83d..a8a566abe3d 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 cff41466517..c5140ef758d 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 b1f75cb2585..f08299f5bb5 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 9ee2a5a805b..169c7253834 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 be5368b6864..7bb438da768 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 ad27d3ad3e2..64dac54dfaf 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 e6bc08065c6..68f0bcfb3fe 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 15839958584..5c5ef49cf1a 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 983f9a04e58..b29a76f8003 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 343a4f12acb..2238965ebdf 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 d1740416e5d..2f19d70f04a 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 06acd464a51..77801bc7aa9 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 ac884973fbc..06d87527572 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 de1de19eecb..5996f540eb5 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 d0273427efe..9534e1857d5 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 f31d5c3f709..405bf58ddb8 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 86714857704..9b12f05a634 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 c61784a48d4..7c1c37311b7 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 e02935101ff..a2136ec59f5 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 ce5e0675249..0bf88f706b9 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 3de1df879db..e1097dc2752 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 a6c0eed7630..47382823127 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 365e5701be9..10ea3740651 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 6ee6e3c09a1..efe63736e9a 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 6e95a64b31f..59a4163d027 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 c8175da4216..e05f11b0afd 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 a1c2f611b5a..6823d24ea45 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 19249535768..0d0655a5b31 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 e67d56d36a9..93f361ca64c 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 0f92a6eaf95..e48cdcefbb1 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 1c1885e0b5c..2341c7f6e50 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 51dc30225d3..b52d17149d2 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 35d8e40d068..5584ae98fda 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 4fc02972c98..e7f637fcf16 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 bf8e6cc3821..6b325fbf585 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 591599e26c6..35607c415ec 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 b3cb0262fd3..6a1a424f434 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 8e6d18a307b..29c30f8effc 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 49d3faaeb38..ffb9ea2a1a6 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 229c939cb9f..53d6b4422c0 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 552faa3d5c9..ccea62c7f45 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 6a6f771f477..95e93abf627 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 467ac173b95..05a95783b9d 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 331ecda7f20..57ed3749a19 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 5abae6a9d9b..cc00cfd8db2 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 ae354803f83..447ef2f9118 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 cadb8a85a3e..7f5eea847ec 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 93a4e85aa87..e01e2e5c547 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 166d9faa329..976c1fcfe27 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 85edeaa9b8d..4cc682f1783 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 8b06b340e0c..a93b94c5bfa 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 09968442b3b..302b371a1fd 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 559d125a569..385578e857c 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 9840d38bdf4..31bed83b575 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 6c1d645c50d..863fe9c43ba 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 bd47fb8a3dc..7bdbf2192fe 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 c4cc246d875..194f6d71360 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 187803a5bc1..146ab731447 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 586aa9bff07..e44d20aa76f 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 67de5030d0a..42827f1d1e2 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 0f0090ca352..7d09da28bb0 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 3bd6f4fc95d..9370c472cd5 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 94b3271d4dc..aec2ed5e289 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 12b36630b06..644596dce91 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 983f9a04e58..b29a76f8003 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 1cf71fd380c..7085fc6a485 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 d8419f848aa..00835038d38 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 fbdbeda09ee..25e3063eb20 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 7530a3dc4c4..6ae59f415b7 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 cef22bb5376..43c6b020690 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 013ec799268..f2cb14505f3 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 6166b0af891..df82fa8d887 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 8ccc6ddbb5b..fc220ab189b 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 5089c36209a..e2294f03475 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 ad27d3ad3e2..64dac54dfaf 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 c5f2d716d52..c5b62af4a4b 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 a37d521c335..2ff8f64e0a6 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 983f9a04e58..b29a76f8003 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 b9e1d703421..dc4ad9a9bd1 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 9a37ebacee3..22bc43e1cb3 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 f4ad1406b5b..6cb71df8302 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 79fa9a52865..75e743ead97 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 c8d34f86046..fc8d74c5300 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 ddf78932026..8a4f7ae6591 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 103103a76a7..5cb0a294deb 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 7f2af783514..8f6ff556cad 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 c76add8051b..f100a16be06 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 a5677cc3e26..4d382fb8909 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 0f17beae89e..b41f8da89e2 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 5441c8a8022..67138d64912 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 847bd8cdab6..8398f4ee7af 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 6236b0ddf4d..ffc38be97cf 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 f36ffd00480..5cde1e392a2 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 c682c57cc65..26929ba4e75 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 5c7c89e6f7d..bdebc95dc80 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 4a9a1d0d2d3..1f1897dafd2 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 bc14d3dc06e..a164a2e8a88 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 672e2fe250d..20dd25217fb 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 faee02b33dc..0403a11e001 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 6b90d879eae..a57beff23c6 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 953a8561050..7e58324a297 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 9680d114d20..e10333d5cf6 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 84963a2c1b3..abd0778e606 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 eb750756c98..546b5af38ef 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 da5694c0624..ab286f4ecb1 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 f46671833c0..affadeed45e 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 b747c42782a..b11fbdbb034 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 24505521376..3612cd88780 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 76a4df39295..67b8121e8b7 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 31fae716b2a..4125cc7afd7 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 df7d6e66090..2b9f5fbe879 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 b2c268a9756..fe6b95ab76d 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 62a845c7490..fdbf417809f 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 c3126fb0b09..d97bbe40c38 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 34a452b04f2..0be6b4217a3 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 d7d1a86a60a..78d5566c79f 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 cd0c24e6cfd..28d5bb92c8a 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 7b73c95bd1f..7b1fc4f0b50 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 df6e5b291c3..a5aadfa3ed3 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 87b00c01368..a39fb381f28 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 e88e143a9fc..8dc4e8e4f77 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 aedb5cb8758..209196f50ce 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 d3ee8249d7b..9b1cea94e71 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 0f5555f1a63..776fb60e4a2 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 9d7f7a699e2..0544d175cd3 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 4791447d976..f6ddf664a1c 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 935b7acfdbf..19b83cd56f1 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 c7a02cbfb52..656bfd477f0 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 fa51128464d..f04c39a0eaa 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 09fa9b683e2..00ff1e6430c 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 91d99076076..0786876fea2 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 ac9e417af6c..75b3a523df8 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 18faa76f919..f245f20f31f 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 6aae35621d3..2910be08300 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 21cebcc4cf2..74748fe563d 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 33e3f94c4bf..39ebfd01749 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 e33116c60ae..2d41cfaec94 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 d80f228fc10..b7f2bd523fb 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 05fe7fa99e8..59b8889cc6b 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 60711dac2d5..e09213b4f61 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 87ddd2de607..c9a5c3858fe 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 ee8acd9cedc..f1eedfe68f6 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 4ef0dc5f13c..6177bdc63bc 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 c90e94e47c2..2362849613b 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 e49d6edf698..5af71d9f660 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 e57be71a85d..36059869d98 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 bf7929c1cd3..45420358836 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 efc88522fbe..c788c80f295 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 82b78b6a773..3b46da0cabc 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 d0444859f11..ac344cd860c 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 f95b70ae8ca..6b2d81b6666 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 1d9bc92b8ae..7db9485652b 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 983f9a04e58..b29a76f8003 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 df7e0257053..2669a4b214c 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 4eae2532001..37c2710ba15 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 95c3b3cea07..60d88120eb0 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 67e1f691c4e..39e9c0477be 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 0d4adb86b8e..c27f4ad373d 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 884bcdd3674..96bdaf30ae6 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 9b54a87efd9..8277f2dbb95 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 9ee38eb2bb0..fc321475940 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 52ad4719903..6e453d5525c 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 559090a1dec..59ff89e603f 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 d0d0db0c591..38bf7c77e08 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 57df853fae8..e8fa29d1140 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 af8a44de114..c53686ae5e3 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 b021492b8fe..b6017693cea 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 0940425c3eb..d74e511cd9a 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 1aae6a91aa5..d5af3ccb3ad 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 f3c3c9ce63d..749d4f2884a 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 281c74a94f1..5c1c19a4d7a 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 120207bdc9b..0532c353bb4 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 983f9a04e58..b29a76f8003 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 f709a78792f..7f8bc0602db 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 d466e80bbd1..7f171f82c33 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 f0c9f6484f2..fc1b9a14f2b 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 be4b53d56fc..58ee5015f3d 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 bbe499555da..3521fc6d0c6 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 396b30e7ed2..a5d524a4222 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 3eff3040866..2cdbcec6f92 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 64972b7d74f..7da34047c12 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 8f1ceecc240..073a261afdf 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 a6c0eed7630..47382823127 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 1c9b05cf83f..f68bf4545fa 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 1050a23907a..da3a66f892d 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 983f9a04e58..b29a76f8003 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 47f1f0acb62..6655f2bfca3 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 2f164710e65..ff4f8e449bf 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 4515876ee95..f39d0069aa9 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 486e24acbb6..e38d1dff9ee 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 7203dc5be15..9fa815fc9bb 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 35135ffca05..5b45a480837 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 be392db3edc..33ba0fe26f6 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 e7973e886f4..1c00186ca67 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 6550762ca23..4ec881a5e28 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 9fb0212462b..ff07cb03703 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 1ef160fac35..986b72a2360 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 ce0fb04e47e..ccf0e7364d0 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 2041264bc87..7fd09f35e79 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 1337b114a7e..f3493823c25 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 4c231dbadf5..e65b7a67e48 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 6b39d08e8bb..f66d35c43e0 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 eb227394ecb..f14e9cab1bd 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 e419cf987b8..6d99ad33ea3 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 ce357bb001e..7c0c13cd36a 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 31a96b934d5..c4b7ce1096a 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 0ae4cf20c05..412fb0e6a38 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 58ba2592c54..afb7906874e 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 4b44f9c641c..28cfe1ce5a9 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 0ee8b65a3ef..d51bdff4218 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 80c3b671044..e042d938873 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 28b767b7d1a..78a68a20290 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 a7371f41ef3..5bd21db5063 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 014cc511240..feea42deb0b 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 0fc09186510..ad258b09e80 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 ee96503d691..bdfc623a20c 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 1704a71b96f..70291a6060e 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 bf066b67130..d029306c299 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 20b12b8bb74..9a1c09f441a 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 949d237381b..1f3efd3b6f9 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 fd03a8f7096..d248e1be90c 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 69bde72cd61..0177ed8b247 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 f1055a75c2a..03ede33fd93 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 58bbd6bd5f2..1e78ea4a7ea 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 a0b43f108c0..b73a7e00cd0 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 b071e2f22aa..4a6d4d67620 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 fe9a4b7a7ca..9eec82b46c6 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 7a8ac7d7534..aed1259b1e7 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 1000206453d..bd1243dc93e 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 ceaa6118891..4f61fe0b468 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 7d1958bf663..df1a66489e8 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 b1d5672a9f9..63a94b3fe41 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 9460b5268a7..9a95e3d0a20 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 a1543a15af7..3ace6ecbeb6 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 d81641aa6ad..1bffae98f5b 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 3d214cf1d14..ddb39d8890a 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 67de5030d0a..42827f1d1e2 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 02bbeacd34e..b3e2252868e 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 449e22cefbf..7221496bd49 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 515d581d605..dd6edc766d2 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 3daf0b4b89a..49686a51791 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 983f9a04e58..b29a76f8003 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 cdee8012304..81ea84d9732 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 6452497079f..e919df6f653 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 e8bf3b59bda..7db2fa05727 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 075507bf057..81bc902ace6 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 49b61ab91eb..a30b5715dcb 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 1daf7ebee5b..b207dd81cc8 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 759d7b89ec3..d92f4011a99 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 6090fddaefb..f9427d37c11 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 3593a5744f0..f8f88625828 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 ad27d3ad3e2..64dac54dfaf 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 0eee46907eb..84f1e5c1ba3 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 b59e1b82012..84700b71976 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 983f9a04e58..b29a76f8003 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 882105ec044..a3746b5bc49 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 c8ec06e8293..eb849772137 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 0a166b98a3c..70ed565c03b 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 6acb9988d10..22bdcce4114 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 25ebae0a3cc..10913ea62e7 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 309510bf71d..20d141d084b 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 40e54fe2377..9f94db270fe 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 595471dba3e..db15b66b1b1 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 ea20c877315..389cc95d0ef 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 acf6c173d89..4ec1631b845 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 8cb53c80842..fadd5e8c899 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 1f83f16a771..57d42282aa7 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 0dcb28f846e..b997f44826f 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 fa8869a9bae..1c8109e99e2 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 479e6d2b660..14e4ee7afd5 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 2e415f461cd..bfb2dd7521c 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 078e6bd02e8..b83b3f67e59 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 fa178b76b5d..ce5e57b99cd 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 794b2bfe8fa..aea93a160e4 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 beeef7d6211..6284399ccd6 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 994ec4692bb..7c4f10ecd07 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 9dad256bafb..b37a177091a 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 84963a2c1b3..abd0778e606 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 e3b6c54eead..57efabf79d3 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 e61a76630b4..6090bc33c3a 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 9f5ab545110..de9b7bf7535 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 1676df84433..172e754eea7 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 55b0670b594..7bee0b8a22d 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 88383e38e97..1277ab9d7c5 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 a2cf4185add..298c9fe04be 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 3bee0ef6aff..066ff70cf54 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 09af0d007ae..47248dfdca9 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 bf293c27b20..caf8ea26169 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 dfada886994..1e44837b33c 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 ef80296511f..3b8ee7e4fc9 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 49fce61d269..4db4accb203 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 b8461009ae1..43194b15958 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 923ce477b6d..c6fbdf5e57c 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 2a0f1dc4772..968673f6948 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 4905209a397..805fa88e5b9 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 521ff7870a4..05b8accf35a 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 42aa471ea6b..bbc22425a71 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 5a0c6b7fed8..18ccc94823e 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 0471333c673..d872e916906 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 0ee19a40d30..90311f01f35 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 0510bec6040..3e09ecf3ef9 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 101e2573451..6bcd8ad7cdc 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 f0a944a5725..502f5c4d815 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 181a3b1f888..2e98b4ce3e4 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 bf3c939f0a8..bc3e8ee7377 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 477858bd968..3e47eb3a8d2 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 05d93b7f8cf..cf77532894f 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 1b92e9ce9c6..8585abaf1ae 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 d202cf8c6d4..15685944c9c 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 84a9507828d..400241913f3 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 52423d41d31..43617a59228 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 b1ec58d1cb7..d3a1e222a6b 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 e95e7e18e9e..0b3aecb0670 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 5ba0cd8e252..9a0030695ed 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 bae22a9e69d..e8a19b73c1a 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 6fcf5f1ea0f..3b53cbe9fcf 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 44e37a13c94..a95256d3219 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 27599896fb0..e3d023bcf3b 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 12eca3ff07b..66d1082e7bd 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 1b6a9e3b55a..bc19a617c05 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 8658ec58b42..853923ebdf0 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 823422ba865..dd3b7b486a1 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 900ae3a9d17..9b806c480ec 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 c08ef88a134..58d633fe0b6 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 9d680370a64..bcc2d43836e 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 9f204b97685..d3429bbc1d7 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 556d1ab0282..fb8daae983c 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 983f9a04e58..b29a76f8003 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 ad52474434a..ca39e9b986d 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 769fecb50ec..04797f1672e 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 69a94e736db..d3bf244891f 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 ecdc95d0f27..b90337ff895 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 bcf2971fefe..6a1fb2b0822 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 a163c19ae8d..33b7081dc61 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 b91079eeb1a..4fb6c4c339d 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 458ec8dd28b..ce57c55b746 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 18afa72e5e7..afcd0b0a6d9 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 559090a1dec..59ff89e603f 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 73e75dc915c..62183cbe835 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 abd001c608c..e5e28e30c60 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 3b62af4e0b7..1f4abb43721 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 04007c62d99..53aef2e16f8 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 b1d46459364..3abdb2f611b 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 1aae6a91aa5..d5af3ccb3ad 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 4ca22c3ad09..41c7c9ab927 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 0e8156b146b..89322887ee4 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 7657b8d0deb..ca4f6ce1ee5 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 983f9a04e58..b29a76f8003 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 40a37889883..c9f69c68d1b 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 19c23f12ab4..3d14d82c10e 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 9c6fa3a8951..524bfdd2056 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 aa236880038..46a3d2206a3 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 d67224836cf..f9c183b6f55 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 782529b7a30..b2017cf3a66 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 cc29356d87f..31294c246c9 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 abbc47ceb6e..a4957c1fe61 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 a678c66683e..83360208387 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 983f9a04e58..b29a76f8003 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 3ead31b559d..a4aebe7cd36 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 083709e7066..f8df5faab80 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 6db2d17f98d..908dee04df8 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 7c6ebfcb989..2b2a0c94293 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 12952c829c8..26f373e0b38 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 75566065b5c..abb9ce7222f 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 f1105bc3f4b..5a1d9cc36b7 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 a48fc037f3a..b9f474bf8c7 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 fcbc6de39f6..c20a279191a 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 a6c0eed7630..47382823127 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 84107754f19..d4275d9cd36 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 c431f1a9404..1b1eb8105ea 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 983f9a04e58..b29a76f8003 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 827066d526c..aed96802107 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 dcf8986739a..01c13ce7c49 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 4025a150d5a..e7e9c0e5d37 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 85ee51fe875..16ae5347185 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 8ef1dcd12ca..87fb2ceeb23 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 93a02485a48..a84e08acd35 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 273a0040cba..3fd439264d3 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 e5a056b77fe..a3f932ed133 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 6f764db0c83..b33ea951085 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 90c7f7b1276..f7acb5b172b 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 1df68c100ce..bb99cc57764 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 d8f31347bfd..653e5729338 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 b7b91d730e6..2f073bf000a 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 2348b092f41..995a94bb2b8 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 7ee355c1cb4..90f4ec75138 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 40d0c9c6985..666f0449e98 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 00f5f52ba69..2274a6fbe05 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 b3ea7a5d1c9..89bef8f0749 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 bc706c9f50f..c389973fa47 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 986fc84fddb..20b0d9a836c 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 ff1d81a9de5..024361faee5 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 b539d85bb3a..262a85c6ed0 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 3fdeadd9002..233fac33cd6 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 5b67b1c833d..1cc09b6c00d 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 82e9a98d6cd..cb38a9c5fdd 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 008669a2855..e472894c080 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 27bd761eb69..1edc8b43258 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 6dfc626320b..a6a1619bf17 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 43292c62e8b..4e35cff96a3 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 1762f18a128..365e6ad0408 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 80072a90ed9..01ed723759b 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 2317e84b9ff..339ad3e65aa 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 f7f95efe463..3f209e04a40 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 754dee98dda..058ec922889 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 c08b30e8a23..6bce9d0681c 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 fea5f084451..6e66c2fa92f 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 ea35729c43c..b58002c7b0a 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 6b0275bd564..f1952791511 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 554e619ac53..d6a99135502 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 47a2e363cda..0c78fc13732 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 7db5dbdb2ec..6af26e8056a 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 5134bed1d81..f01f7ef4134 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 54fd0382946..73972386ff8 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 dd7b78a6da4..ab5e8bea973 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 4997093701e..cdd5c0c7977 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 19d7b58f57e..03e1a68a49f 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 3556ed0beac..c368c12da71 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 8d4b6856e06..0783b5c6200 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 c1057e55600..befd79dd9c3 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 449553a04ef..02a80a99148 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 b1d8f35707e..299b89ef7a7 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 b076d793629..d3776f7a113 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 7452878a24f..bd9f3a3d7df 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 918ddba8ea4..3831cca2af7 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 aa0d25493ba..7a460f8d161 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 ccb8131e66e..c2939f57da0 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 438b045c824..d8d8404cc59 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 126819c1b83..bfd40a37b5c 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 614e7095f78..44d1d253d4c 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 9086eca8b91..aaac0066b4f 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 ca4ed09880e..cb8e3cf4122 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 3b91319faff..3409b20f551 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 4fe46334aea..6259bcd3eb7 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 d339151f5b4..4e043d843f6 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 a0b6c318953..2668614da6f 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 17be9a9c8f8..fb5eb0c6dea 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 73310c9d246..8f8c06d0012 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 99cd1f72143..06b745cad4c 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 67de5030d0a..42827f1d1e2 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 0c258cc5104..6c425cf4a6f 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 b1817d17e65..67c03bf472f 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 0a45400d88d..02ad707c725 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 b8a4b9f3344..b3193c425f5 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 c6ee8b59679..bd6ede58821 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 9969ab0fd70..f8d8cbbaae2 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 34ce493aca1..6020cd6d85a 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 1638710073e..68836073ed4 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 78213f5ee19..56b86f26222 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 6548cb39686..f5222dcbd2f 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 d8058ab4666..69185cccbf5 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 458c518a832..ca1657f6db2 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 7f42c7fdad4..8cf727b91c7 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 b467682d2b0..617837afa39 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 487c2f8676e..3dc491e0895 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 cee4bff0cd9..72a7f727d76 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 ba0b5a01555..fdfc4d22b3e 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 88afed15a2b..243437f3e7d 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 1e66e6e1d81..bc215a800b6 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 bff23d08433..74ae58c18a3 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 9bfa0fbf50d..b48033b0d1d 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 f22498fe213..0f316805047 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 a76ca8e0c50..64b4e5e55e2 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 61830ff3952..75e1aa491e3 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 772e5a71f04..99a0dbed4ed 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 bc1081d6bca..7954698c49f 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 3b3af9af334..a7aa85442dc 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 7547a425ec6..6165ee94bc7 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 4985affcaca..9f17da64bb6 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 b0b324b2a5a..25037686251 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 f726e7082b6..c65545b320a 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 b8a9c31a932..49e8a4c3813 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 25932b7bfb6..23560157eb4 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 487c2f8676e..3dc491e0895 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 766d4a5f197..6a373af2ab5 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 ce1bfb2bdac..a84a683b528 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 b5a0591c73c..04cb542a9ba 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 1619bc278f2..3c5502c6f62 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 73d4e15f443..81a61abafda 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 549a5cd5f28..051550e99df 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 071e336092d..745ce404f1a 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 5c1ff1c7bcc..214b442a1cf 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 61e49b12c90..17d62589059 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 d91b5f78208..c5bbc0936e3 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 9cddcf17c71..8839565d4b2 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 eb571706b0c..9e8c74dccbf 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 7f9eb4d6cac..dc88470dce8 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 e1e6a7fb648..3846b5f6506 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 b7c4898b164..4ad7bf21ea1 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 d983c78ebf7..2c2f0630a43 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 44dbb659699..c86045153de 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 13f0f395543..72bce9ad44f 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 ad27d3ad3e2..64dac54dfaf 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 021bba6030c..c473646e7c8 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 625fdaf756c..ddbb11280ea 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 983f9a04e58..b29a76f8003 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 a3d4f718a52..04d7e168f56 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 861181b8719..19e6605aca3 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 2d7e00d3e4c..2bdf4b25d05 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 bea3fdad670..a26ef394d60 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 e3e710fa5f0..1955a69c9c8 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 e3824fea45f..8913ade1308 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 81c2f2edb5d..4f64b3e372c 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 6213aae355b..1546e9bf135 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 bea2b3a83ec..e522e1aeaa6 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 aeae3564f66..22860e3333c 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 4d1ce950307..a0e1b9f91e7 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 bf222615f2c..5db6009cd9e 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 05f8f1dc826..3480b4f45c4 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 4e0277de408..245335719b4 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 a2b9e1ae50c..ca6d32f725b 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 2fb231f7874..2224b9b028c 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 9178fffd552..c18b9ce2110 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 a754a75ab10..c74227fa9a8 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 f20132c2bf9..554794aed4f 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 e190f962c46..e42ccc4d0fb 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 4dedd28ff5b..a46f27079d5 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 874028535e1..168386e5dda 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 f21b05dc0f2..99b24d74c1d 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 74c793c646b..feb852d2fe2 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 0c1532e7194..555558c832b 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 bf9a1e9556b..580581dc314 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 f87457d72ee..ee7d94077bf 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 aaff7d1bdf7..c9a6bb73c51 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 60b1369ae78..b0628e26d24 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 d461056afc2..74770b2e3cd 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 5b6b873891f..3ece16bd5a6 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 0a5d34df316..2d02ff036c7 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 487c2f8676e..3dc491e0895 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 f4a3293445c..680dede6943 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 762400b6a9f..483ad83b402 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 6f5602956f0..0b52323e04e 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 db526c184ab..7be558c6c47 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 bbd9f2f9a83..cdcc4f44a80 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 542347140ac..3d7f2fdd3f0 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 51d51e11e44..d0e33821f53 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 06af4c478b8..250ed98ca0a 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 4078cfb9d2f..89d1933cfa2 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 9e4318a4d68..9b947ab2246 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 18818047ec9..8d9749b9d27 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 3ca7e751e68..1af6560f377 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 7a32a1542b5..3255b381757 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 6fdb93bb06a..6eeca0e5105 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 39fa39f1d74..8b9aa576cfd 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 32a9ad3e19d..2c3858e1c9d 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 6688663e82f..1e572cc5b40 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 650d7367dde..0d20a26ccd1 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 a6c0eed7630..47382823127 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 3f152ff71a6..eac09187a3a 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 58022ebab7d..e6f94f4a567 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 487c2f8676e..3dc491e0895 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 150670ebd08..f9ec6e738f9 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 40006c00bef..aa3c80f5a1c 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 0bb6404dc60..c5c0f7ebe54 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 f3d83a1dd90..f50537d24a9 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 a70daf89df2..4abe6d4e8d4 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 6894e5700a2..ee6867018f2 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 a1a4791c232..50dbb9bfdee 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 313072823e7..bb8bfbbe8dc 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 bc163ab5342..a5dc6cd2f37 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 e8c4d79fd5a..cda5dfac57f 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 d4c169651a7..b1054933d2d 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 7fb87ebdb24..4a77e16c1f7 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 a9df1d8b063..196a30933e2 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 9714e8e4b25..05947049301 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 27bc860dc67..ac18e917d61 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 a79cf5d8431..841cd1b7e20 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 eb2ed903f22..a34b15a3015 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 8cc58186e43..66240349635 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 bedd4ba1767..8d5c91b29e3 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 dc7359145a4..2cc34d3d316 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 de1de712a2d..0108aa4e64f 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 45178d2e64c..059d76c9f53 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 487c2f8676e..3dc491e0895 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 ebca1fb0169..0bdf041441b 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 5244a8ff1c1..56de452cefa 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 04cb80f5b41..531ab60dca7 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 1415d300f6d..b0a70d5f24c 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 f5bc7cab642..37af47c8f96 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 0d6aa40f68a..5f04084db14 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 b2503809580..e7fc35f476f 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 f92c1c3179e..a5ecded565d 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 2b643a0f2c4..f15cec85d47 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 0e6a1711d1a..36a6bafb6b7 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 b86b4fa9ce0..d9b72d04738 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 0b928717031..d38a97d0b90 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 289055989ae..ec7b359fede 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 556cadde040..638cff4091b 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 eb19f35fa93..e6c80eb411e 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 f0afc43e799..aeb17bebc5b 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 3b856f65a29..82a76d0f24f 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 e9e8568e761..a625c59a1d4 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 0dd341cd80b..9cde0f22be0 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 eaa87b42181..ce6b73a65ab 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 82d6f56ded6..670b0787972 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 28d03753229..a98007c7deb 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 49f08934c44..6f992022219 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 0eaec18c769..46956766df7 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 274e3802edb..469ccc1f32e 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 17f678fb7d2..dc084d46fa0 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 b11c849c893..d5ba98db4bc 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 e67b2337e62..84261a731b6 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 146731e4166..2bd27295eac 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 efca79efb6c..6376d5715f5 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 1fe5d518cad..d4ec1a99861 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 bf04e16e764..6710744d202 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 b9c24c5929d..1a904952474 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 081283b280e..c8481435a6b 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 ad0332850fe..329e514b13c 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 8454ce9285b..0d9e8bceaf6 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 40ecb8b773f..444229dd986 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 cd67a735ace..5fdc442ef63 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 e834751cde3..8346de636ca 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 ec33a088eb2..c3f2e77ca01 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 fc04ad24fbd..db67951a26b 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 9e35762607d..802bbfa0d79 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 ea67d393097..ccd69080f4c 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 2b452a6902a..b4800ba2838 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 67349bb0c5f..758ae6423d0 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 67de5030d0a..42827f1d1e2 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 0682b9ddcc0..436490a057f 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 61904898d18..73f8157ef1e 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 a4439e0d9a2..97b57450afc 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 7b27417cf58..3a04adfb808 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 c6ee8b59679..bd6ede58821 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 6eb102f7d4f..b256cfa80f5 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 f37beff299c..00a0e9e7949 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 c515e878d64..18bab2bae9b 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 e82e40fdf09..577cd831dc7 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 58ad66911d8..13bbb560ddc 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 1473c4760f0..d6e2fdd6fc4 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 bf27a49656d..ca69452e4c0 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 dcddc578c70..07bd606585a 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 c0dc818d58c..4a9a59e8d34 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 487c2f8676e..3dc491e0895 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 fa5012a6ba9..342455b679e 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 cd50f46e980..2286040db62 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 fbf81b801b5..2e7dd5cbd14 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 7a965cd6e66..31fa5269f38 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 1d7d1e2a88e..dc2808cfc7d 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 c0abdb61578..0be6bf6576a 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 6c8af66ff66..63ebfe4e069 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 611023ae427..1a62a4c9c75 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 2db6aad84de..e18b08d0f6a 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 1e2d99dc81c..3ef68584045 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 7c1e5b85d73..b650629acd6 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 049091162de..5c58762f866 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 d904a2257d2..e4c4625dca0 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 54227cb8dde..dbfbcdbb77e 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 f648db56a07..7935406ba3a 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 9a86416f1b0..5530ff7ae31 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 b9f9cf32a4a..70da1bb3ab6 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 ef19f80f20a..c5612ed75d3 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 ad27d3ad3e2..64dac54dfaf 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 e5b84314e50..6cd2413bfe0 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 0da2bdbadd0..97837bb88e6 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 983f9a04e58..b29a76f8003 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 d02c13ed529..e87983a2f9b 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 1c7721f28c2..e288ef8dbfc 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 b94a1229182..c1ac88c1dfd 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 c12d45b8789..4589b37bd5e 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 f4128c909cf..18f6d221274 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 643c9547835..ae5ee0509eb 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 e2e288b0cec..d70a1dda1a7 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 b51817c849e..0191b93434c 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 2578cebc618..c6c90960d2b 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 8305b5d1d37..3b101a070fb 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 b3d9f5e2768..6933005629f 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 d9bb10306bd..6d8196c6b07 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 e43c7c95c94..5dce1ca975e 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 a4b70322acf..0efa8a6bdcc 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 23dfa887160..614f0864bc2 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 93b888cbe64..88300d0c923 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 644e9e69dc4..fdd6e329fc7 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 d5ce4c2b154..f0374a41848 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 027057cac44..ee8e183c639 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 67539c8a1d0..120d1e0fcdf 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 3c16e4f3455..fb0838dd0b3 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 bdcbf9e3b5a..4dcc7139144 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 f46bdaa4a18..e59659b0d22 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 3e8f2b76053..bf9cf6bbdb8 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 6f4908b8232..266556ed8d1 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 d1c7160a305..711c4f5261d 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 dd043fca01f..948fb8ae3c8 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 1f614cc76ed..6ab62e79514 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 753a795b26c..0b38b05cafc 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 0ee7b2a4db6..5cc5b20149e 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 8ab0b55d3e3..807fb8dc773 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 421f12e3d47..76cbc085e79 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 a254f9c1217..2a011439692 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 b353593e079..ecc00aa97f7 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 876d83969c5..12547f41ed2 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 35d5c019203..538a14bc1d3 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 9be3de6a211..17a2333c67a 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 dcf794b4a9b..043200cd61a 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 e916f97bfef..e856192c435 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 c6ee8b59679..bd6ede58821 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 3ff1d4e2700..5dcbabe2e9e 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 50f3532e932..86b2b1e2144 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 ee7d9dd453f..dec6c4fd5a5 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 3ac467a64ab..b745239cb78 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 74ffe401148..53549cb88cd 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 63d6a355379..07a28c92c4d 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 79ca7b1a7b0..b5c06e3ded9 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 9008b94cdee..c26508eb159 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 70a235d33b7..989804a2dd1 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 487c2f8676e..3dc491e0895 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 00aa5793684..b38757d0baf 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 b0dda7a5355..3d3dff75a6e 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 fc08e322b2e..9f95c0765bb 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 df32dae0ab8..40470a8b834 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 22805593211..85d0baa5ab7 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 181f820a25e..da2a137887d 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 910220d7f7f..e157a7c5cf0 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 55701ddaa49..31e720c97f1 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 1ebcc885213..3f840c9a9a8 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 4b6dcc6c1db..7057dfe148b 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 03146f40908..48cb04874db 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 631ad9eb4cb..0f8b52aee6c 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 5bd609f5aeb..c0ea777fea6 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 3f7091b4d6d..1257c20ab4d 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 40b47e8ed2d..4a38dce5687 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 ae2d861985c..b793c04d1cc 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 16a2d5319af..0215676f654 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 f99fb456d74..36e701e4aae 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 a2b9e1ae50c..ca6d32f725b 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 35020a81d8d..9228ae195f7 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 91c79d3b0ca..551a339b3a8 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 69cf8d4c75a..bfd58df6d86 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 b36b401b321..42c2383f333 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 276f46d65c3..5d472034bf8 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 8fb0e5d4ff3..e89e63009f3 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 38d96c1b5e5..cfcb658e87b 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 2ee3d545537..27889ed587c 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 732a433fbc7..3c003d3faf4 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 aa461679bf6..0a880545e99 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 fbfeef94c4f..7bb83c294d8 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 c2b14f208d7..0c81c58dc39 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 fb122b3de5c..00c3f398540 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 c3e7c48bd03..74fc64810ad 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 cb51f2d1bea..5f15fb6fc42 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 bfd193e6b3a..9e65cc1dcc8 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 1d838efc9ae..da7ca5f7b47 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 12b142be92c..a52c93b1b44 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 4e0555f9fcf..1a3a0126f52 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 61278520d2c..fffb5a8cdc0 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 a3294d6e52b..32441c68ba1 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 8e8608365bc..78306078f0b 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 427b5f84407..a9b8279dfbd 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 7f98949907f..2585a0e2293 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 c6ee8b59679..bd6ede58821 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 3bfa41a8bd3..3498927d025 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 634ace9bf40..61cc778d289 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 262e5b9ef8c..e0b0dca191f 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 dba4f6661a0..eaebdc32ebf 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 126fdacddf4..04b29d6a789 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 56b9ad6e321..8313de648aa 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 23cb89b9255..24e7a1b0c67 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 2861043ecc6..b3576d5f1fd 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 accdb33406e..9f59a08f642 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 487c2f8676e..3dc491e0895 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 66768a82ba0..ba35c8e1f93 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 b7202c304bd..6a7fbee1d5f 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 77d0a78ab0c..63238e52d97 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 6aca70b0201..7b6065f2571 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 daf70f34a83..495991ee079 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 19fd6d0b6f6..fc1c9a6a03b 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 ecf1fa534d4..e4d79cb6554 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 7f7a8c66eb4..78fd8e4344e 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 604fadb6071..4ca9c8dce6b 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 881e8afaf36..c202eca415a 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 842eb81fbe7..7e8591a02e1 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 e7ad82d34dd..b560458ff62 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 f216f8ec52e..cbc18c8a1b5 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 a8a4ebdfba7..70572125eab 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 7c9899669a2..23d457a0305 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 63d72225793..771626d2016 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 27b24f234ab..ba54cfa6233 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 bf7357c7471..9b63052e20e 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 a2b9e1ae50c..ca6d32f725b 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 a6243323552..8a1634ecf41 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 080e1036ccf..03c7fd2ae05 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 4bf67584325..353ebdbfb75 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 fa20b58773e..4622c9717d0 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 a6c0eed7630..47382823127 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 a1c24121ac1..a698e23b516 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 f320836bc45..e2637cf3b50 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 983f9a04e58..b29a76f8003 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 269cf114c23..90d2f16c8eb 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 46acb450e80..ae16f4cd95d 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 8db1857a8d6..881d40a661c 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 57dadf284e4..2c5ef694a5b 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 4d3ccdd73a4..947b6a955a2 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 04ee72afc6b..8c71d340dd7 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 7e2a8788f64..23ad013e2ee 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 b61bd5ebd51..92ac7ca2f9f 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 886b67fb3e6..6d9445d6fc8 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 e159bfe4564..3788649bfdc 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 ca18b414bde..f68846dcd23 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 59c66acfefb..7266c759fa3 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 c4bd9971678..baecc21dc35 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 090b0d59f88..ae77ee47cdd 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 2706d063898..ca540c8a4cc 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 01b2f94bd81..3629a3fec05 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 21736ea4027..7f24e809977 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 e5346b58da0..a5245bfe4c8 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 e07a28ac018..c8a73af4121 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 d15757193c0..3810709636c 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 fe530a47c7c..849d2d8afb1 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 73720a9a9f1..7cceb14a425 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 fdb1c740b30..ee5afab3eec 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 0632d4d67d5..bfdb06504db 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 43634ee462c..33c0cec5dcb 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 06019dd6141..4b33714f0e5 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 1b64a02fec9..bca62eb9643 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 baabd083301..3799f46e3a9 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 52e197df315..f0a53292853 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 e627b9e02a9..d491aba4e4e 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 22b354ab602..3c5ab308fd4 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 81d223fb599..7e4aadf264d 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 c3cfad87ca5..8a12dd13435 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 f0fe9f64529..8b83f2bb210 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 d7dc121acfd..78ce4efa4b7 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 9e1dfe13711..46292873cb0 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 971b297a128..74b8daa5a0f 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 e9c879ad94a..589d1f8e97f 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 13ea667e058..01c8bd6f263 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 b6d3c5fa7e8..7888fc1fe1c 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 596ed6b44f3..7b16271f579 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 32d824432ae..5f32680f5c1 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 c5066dbc4d6..90a61ed3cd3 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 cdadf40778e..f4cd206696b 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 270756f04e1..9d367ec6b6b 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 562452b2fa7..fdcf97396c9 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 4f6ca3e6621..e0b7e9682fb 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 2594fcfa179..7808e3c8b25 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 b4064ab9033..fe3f3bc0471 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 4aa2fc147ce..0c72775a794 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 767864b2277..e3404788d05 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 3c2018ee410..62a18b392c5 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 0bc8462aa79..0698a7e02e9 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 cd45d6fc923..65487eb34c0 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 009be0982a9..910051af0c8 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 0bb1e18a7a6..0e03f8e8e83 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 4a5ae5c9da3..f1fda558260 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 c4b17982047..f49a1db23aa 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 d4173b0af38..cbe7b723f0b 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 f95e1320db7..330e43d49a4 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 948b3d67b74..e5e162a7491 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 ff5ab866ba2..d304a87a1ab 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 762dbccbfec..cb023298f24 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 3dd77157991..daed950cad1 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 8a087b56711..03eb231dade 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 41178ffcc9b..a1025480c58 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 a07880bc946..508ad857863 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 a060bea7061..3a4a596be0b 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 caa42cc0589..8be344613b7 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 c7bf4af3c63..9d12b7277a5 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 4a3d78dba6b..b93e093438f 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 033f8b73a22..7cad3a137ed 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 33185750636..d96c61a8695 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 81f0105c7e5..8e75f42161a 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 e7b80e1b11f..a35e6147019 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 8cc00eaedd2..64ef034f1e8 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 c1e40f7bdab..0583399bdb1 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 3e0f9dab2c4..b372348656a 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 4edd1f1c9d2..38cfead020b 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 c4657b1df78..dc9f3bcf2eb 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 b4fb0416a21..eeb8a18710b 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 3ea1c231f05..4d0fb61c73c 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 cc2de3a27f8..912b46e25ee 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 5bb39056b57..b6d27819413 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 2e3ce59d75d..62838bdb731 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 222cd9d2a39..466e16e920c 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 1fc78a4f5ed..cf8e19187b8 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 91529e2573f..be083debca7 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 5c181545869..006d549cbd7 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 6b3fe1a13d5..8ce02c03d60 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 bd5f3369395..8acc08c4004 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 df1d35d6a2e..c26a8e09aae 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 9bc697502f8..26379c31508 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 82f4ee39a4c..7c3fe58634e 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 08827e0e6e0..c3a14f8ed91 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 2c43ca4fdae..f5343d73efc 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 f4169d7342a..6a4c0833a12 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 0077160bb2f..d724d96394b 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 521cc72b4c8..a51ee6f8f74 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 60a0920a862..f7ff84466d5 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 eff09cd6a0a..ea49850d5fe 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 d8e7e3024b0..d5de8bb047d 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 1f991a14b7b..5a01e7c82f8 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 35b50b1995f..6f186a439f6 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 144f5a1c97e..d1e823af498 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 bcae05a8c22..52eaba6cf9b 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 19e54a45895..23ae08f6f13 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 d063d2dc85f..05777c40258 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 8437b20f7d1..847042f90bf 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 d192f3ad447..ad80cdef7e6 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 88cbd1d9a37..3effe74d670 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 62e538325d4..63fc1f11d30 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 64d8c502bdb..328b37a7d36 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 a6210764eaa..0ad732c26a3 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 0bba545099b..c2ba3d3e506 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 27798f1e389..a286cf09190 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 558b59c4542..168280666af 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 1b7209f2a00..3427e25ead7 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 7ec359aaef1..7079826cf60 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 1d3d80a00bf..bfd724819ca 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 e190f962c46..e42ccc4d0fb 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 6ff0c135257..887ce8f57ec 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 584639630b6..7bd93b7e40c 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 14d1c209178..318ff6230ed 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 efa81555fdf..ceb5c41f215 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 4b6c2237a1a..509f5dd88c9 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 bb46ec29df6..b5e2cfe338f 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 610cbf7aa68..229a0531b30 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 a31925a4dfd..3f802037b69 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 3275e1633e3..b322ec8d8eb 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 9927fe6e547..f0eb2e489a1 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 51b03b2efbe..8881e40a1fd 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 021727fed52..8c2d36e60db 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 c6ee8b59679..bd6ede58821 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 77322a38183..5a6ba3347fd 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 b93ed10f3e3..c4a10e335e3 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 d1c3b31d94a..ab6ab02d10a 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 6df63e17a0c..a31c3a74d2e 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 479a9ea9ed8..4488b796b88 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 82d84690bad..9adc56ba33c 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 14da90933cb..17a3c2294ba 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 b6833359f93..760069fddcd 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 aea5b68f3f1..fffbfc3b6d3 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 487c2f8676e..3dc491e0895 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 7125d00bde0..75a9a7e16fa 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 8cda62bd6a8..f49b148dd7e 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 784ac54faf3..b61bf2a4389 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 0913ae61994..345e402fa11 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 e1b7289c888..5aeb0110abe 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 353399cf801..ca34b79accf 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 583920befed..8a2b2cb70a3 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 244d554f1d1..c306c8e3d11 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 7f8af7de0f3..61528726a4e 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 3f415ba6840..ee3d58eed06 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 1b839321490..1267106df06 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 f0c06fd8a3c..ad893b82854 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 258d009c547..0b391abb898 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 c30fc3aad60..887d5f2e9f2 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 07dab09b746..f71744f588d 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 dc601ac91c7..6c78c1e56c4 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 eefe12fa987..949e12ffe74 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 503445f8bc1..05ff31dc609 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 ad27d3ad3e2..64dac54dfaf 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 c630f5b067a..b7742bb596b 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 2f96abde4eb..b3863858bce 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 983f9a04e58..b29a76f8003 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 3e2d6a41cfc..7435d1b410a 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 630d0965793..b868b78612d 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 0c761ffdfaf..d51f4442038 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 eaa79c52214..ce97dc0b01e 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 131a6edd36b..6cc79d9d68f 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 bb55cf3786f..fcd088bf88d 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 9cbda07f02b..08b410f9b01 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 5e1f0ea60b5..423d56a1c57 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 caca9406308..5a82a87ff8f 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 ddf365c6a4c..95279b84d5c 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 35a35ceea4f..c845d079bb4 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 ff712617074..1bfa9ae2522 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 80cb638daa3..b847a164071 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 fb7fb9eaa97..0a3679698cd 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 4b0f9229907..0bd3dac54d4 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 5a2b92838b8..d2fcd2f733a 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 8bb515da45b..31f4997162a 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 d85f619276d..d80f95d568c 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 8434e73e3f5..fea9868a7bd 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 f2cdb6cba3c..928155def03 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 885a961f206..7e20612ae8b 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 232d4419b90..99774555458 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 025d3d340d7..7c787ed61cc 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 ad3a3e6c9bd..35c01317cf3 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 213a3248c8c..8e66e25348a 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 bd71a27db73..c5ffb891041 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 df94a4727f4..137b9c01aee 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 0c5492a1dda..2c23e85c92b 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 74772c21c72..880e7ac784f 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 fdbcf0aac8d..4468e3fab10 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 1967b9999f8..b319a468cb3 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 9ac999f477e..a47ca524cb9 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 a16c95a6669..2df4098a0be 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 3702b2d8329..10e473d9f97 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 7819f8f40aa..5c294c32744 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 7f10af8c31e..d81987f7841 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 8e44976291d..639437492e6 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 afd3f1be254..54d8e5588e4 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 b1f1b7197cf..3fc86ea0cc4 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 c9bf9eb27fd..22211713329 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 a03781f33a4..c988e66bcf3 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 f2fd3887f33..269ba2ff306 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 6741790a143..2664089454d 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 be0d9f20025..fc8ad819af2 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 65b594e7a83..44fa3277351 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 5997eae1ad8..caf90cb76d0 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 3a364f7f527..5a36ba41a29 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 13719d4570a..fd1d52f0ed3 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 84963a2c1b3..abd0778e606 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 8399887bb5a..0d866ec8690 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 03657f4800b..e59a902d599 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 38ee39414c9..797e80632e2 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 cd0eef97651..2e432585f17 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 d68dfcb484e..8efc556b9d0 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 ba654ed7a4b..d2e49f3e753 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 39628d302a6..50af5bd536b 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 ceb8cc60c31..0417e892585 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 5124bf48a2b..a4f73b6b0d8 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 542f13d9265..f221f848755 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 cc15904ff29..e7cb9bcb62a 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 5f22c331749..b6fb79a7951 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 0b8a2ae2173..4bb4d491df4 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 0db06d828e6..9bed47a798d 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 6cbcb649e0e..466a1f64c66 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 8d0e06d5fe8..96ffa01504e 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 3633be19611..f1c61905d24 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 8ed606588e9..2ab647053a6 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 cddf5855a5f..b66debc86ca 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 5f579903743..38cfb2cb866 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 91825a2cbec..34a88ce789f 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 36a38a21788..ed3964d1ec8 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 18455234c88..c761a8eadc3 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 dd40df2ecea..aad9b578c66 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 a7ff49a95d1..f38ff18b355 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 25b1abc1812..1b2a12d00fd 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 8e9a4afcc77..d681904688a 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 70aa30b39bc..a4c298bb1e8 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 86f5740c326..3818c8e3fe7 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 2d6694e7781..5d8422b3745 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 c8f1bd62cdc..6d00cb22c31 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 b9f1b8d341c..47e9bbfec17 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 26b171a4c96..34f5acae71c 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 2635fdb156d..d07d3f77653 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 06f0fca10f3..067e79e8e3c 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 98f03d13e2c..31fe62e7024 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 e5c860dfa64..b2d17ae91c0 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 67df9292268..edb80fb76bb 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 da7f018792e..35755af6c58 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 604f512473c..13970bda92d 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 9b1439b3a96..2a12d7d60f9 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 374e27f0ef7..9b5fbcb26c1 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 1573a09d652..a0408049237 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 10c81c1c232..60e7850ea08 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 ffceac8c474..84ed38e5229 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 5a19c4bb25d..5b77a65b062 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 83e742fb2be..1749224cc3f 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 19901d1b40c..eec9452fc65 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 63fe32254f7..38e9049574c 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 983f9a04e58..b29a76f8003 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 85548b7a2ba..eafbc59f4be 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 53c41408965..77e633dc4c1 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 2faff5b4a93..0f17ddb1ac5 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 0cde2dc9894..1b12be3454f 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 b1c2d86c73b..12e120a2492 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 6576e53fea8..902ecf1e4d5 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 dac54fc6fa5..e6fe43d7f7e 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 268d74686c9..6c27c5f7386 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 6a9e1f198ab..f2cfa1f05ba 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 559090a1dec..59ff89e603f 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 c90cdf4df08..c4d5c7ea5a3 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 060a29194a2..e3fb7c8d249 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 6d95858edd3..a85e128a9d5 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 a23eed02876..0812858f882 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 f0897036a74..02278ad0e1a 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 1aae6a91aa5..d5af3ccb3ad 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 3862f5d7b23..7a7bd4c2852 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 42c6668e74e..aa8e60970c8 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 6f709415e06..2c23c9e39b9 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 983f9a04e58..b29a76f8003 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 73654ca6557..ce6d91fddb6 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 a3555ac2650..268f626e92b 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 9adbdd11c7c..5e926a8cdeb 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 7dd64d69781..819f74fc01e 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 f97d150a4ad..23c08a3b57c 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 ae7a966d6b7..0493be5ebce 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 ba66bc23fc6..0d67bebac4e 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 569d3830504..54ed7bf8ebd 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 b8660f270c8..f178f32bb72 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 624a280ea46..f5373e78223 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 225a4231a27..40a2b7be110 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 8d15c7bf792..17dd54c4087 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 c042dc4720a..9f02996e80f 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 9a610568114..f53b66cf33a 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 facbe33f884..4ba3ea340b5 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 f3573a26703..ce4d52423d9 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 88661a24193..32b3dc39ce2 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 353b7190822..fa4504c0709 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 ff5e31f5564..5175b1998ac 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 29de8b74c57..28b1d093510 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 63b13ff6854..e45b08d5a44 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 825e0a12a5f..f4d1a0a6247 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 24d642325fb..09b3dac3fe4 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 76fbd64c8b8..1d2f7a576d8 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 e7a3797fe27..001fd45e2b0 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 d5794557aaa..61fe97a06db 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 3e71e64a155..c92ecf19581 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 3b0aeed383f..9d2a313b832 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 dce7eb58ad5..749b0c7c6c4 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 0a4b2c7564a..f55d2064f11 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 8c321a38bc5..c9c7226fe44 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 f3e57a99c2a..24e090a3c37 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 e75d21d2c66..e8691d105bb 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 ba6e41849d5..90ff14a08a1 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 a9f087e5af1..85a4cc95736 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 1cdfaedc7a4..6b11356d003 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 a6c0eed7630..47382823127 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 0e1bcf3cbc4..02f00c8641d 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 112a934f650..c1e4ae46a91 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 487c2f8676e..3dc491e0895 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 f1ce7da825c..c39cd03beed 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 573902c9135..d4af203b7e9 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 4ccd8962640..2c2e3d960aa 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 7ada4031b4a..cbc1c0c0093 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 589c2e32fbf..1e68a84031d 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 1e42a594dc2..d47cd87992c 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 7183993c6ce..de9b190e93f 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 50266bc55c5..f26a158bb44 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 73df2ed8286..796adfde480 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 77c09ca8b2f..b7a61802ca0 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 46afb529fb7..1a9b4dec7d2 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 3ae67d10360..e4a9c6c2c1d 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 8c846d5139f..492b5025c19 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 17158530ddc..0e6ac12abbf 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 239e307fe8b..d4d2c4f7a9d 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 69a43995bc3..cb046ee84da 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 e3e1c3340ad..f148ba88646 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 fc3fedd3d6a..07cdf1cbc61 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 3b0aeed383f..9d2a313b832 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 7cacde8ce7d..5be68796e71 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 4ad7ec772fc..3e648e1ac40 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 8c321a38bc5..c9c7226fe44 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 331c776b011..8cb38176f54 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 b0b55394635..8bed552e8ef 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 5b9c79a5702..f48890cdc88 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 a9f087e5af1..85a4cc95736 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 ba4eda7a519..c5a53ac5581 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 c9a28b14c34..abc965ced29 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 0c907c5d4c8..82fa7211d7e 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 e78c83272cf..15a6ace604f 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 eeaaa1b47d8..f15578bfa2e 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 414c3808778..391cda39468 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 dc2b70655a2..06d51d32e73 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 35d4c03dd91..4fcbd78295a 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 38589286723..68818e272f9 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 2e4ca6ac821..9d581b62f92 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 ab2ae978689..a5267844210 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 cab0520f7b5..50a476ae6f2 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 6cd9ce9e212..7040c1f57d6 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 ae55845ad8b..7f8076d9825 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 32aaaffc11c..4aa27a419d8 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 db8096b52b5..334b1d81ec1 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 42574639cc0..36b59c8c571 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 03291a667e4..2f1cafdacaa 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 f9e5ebd962c..47fece2aa4e 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 dd490f6a0e7..1c5f5ddb006 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 014a5ea674f..10d55fde93b 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 943ae7c2dc3..407cb59e5c0 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 09dd280aecf..71f1ba4b2b5 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 98a9dcf4792..52f4d52f1c5 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 4087a15364a..b0d63712edf 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 cc1ee2d8c63..371296760ae 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 2cbcd36a1dd..6ab4c9f9ed2 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 cb0558f813f..2f9b2d706e3 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 2223000e211..4506206b25f 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 b3cc0fdbace..d535e5fd9f1 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 e06212869f9..f2b639e7d61 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 3e604c5e2f2..c125def6b77 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 61ea3739a11..f5dbb110ebb 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 0c994a41137..99ddf1e1032 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 af54219bb7f..edc9be2b0cd 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 b892ce98802..ce421bab518 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 fbab9e734ac..9f58c15e361 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 56164a1b153..6d2612bd32b 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 6ed87d9c2eb..62062acc8e7 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 4219c5aa362..9bc7914c6f8 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 1bc20498443..26ee7adab60 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 fa96152174d..dfcd4bda716 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 19725b83035..42d2f5b65d8 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 3781e14c227..40163f06a40 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 1bf2894bb0d..c7bcd926378 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 a7a59dc05c9..3786fa057e7 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 4233e106728..81533113e8c 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 f434175bf9f..42962eb9737 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 fedd96d67d5..f9f3a205eb8 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 3e92f7856b0..3f1d5f76d09 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 a3bb86e9252..2fe2ecdf63f 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 2dec92fd013..047864061e0 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 ee1d761a3db..35eeb1b5816 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 68276170874..ebef29302a5 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 71a0b8a7266..c29460977d9 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 543d7e8098d..577c6fa1527 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 35c1051cb5e..25abfdb7ac6 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 ff9282973c6..1572917759b 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 e062504d972..a9eef67de43 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 378e0cbb2cf..09e0bc93194 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 edb69ba1c7d..5e233d484a1 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 cf4d8f7420a..f76a29a435a 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 b634d53abc5..39f0090f8be 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 683b9493b7d..031e3a49e7b 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 4400e330ef7..a1205795fe7 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 8d9a6a1d7ce..1eec2af4f17 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 29ab9e594a1..0f197171f8d 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 afc73820cbb..656490b7d7a 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 381798c7ac7..fe17141c18e 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 358b176e625..c589654f64b 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 4664beb6616..a231f7faaf5 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 f69873fb04f..0f05a429b6c 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 253aca9e57f..7ac14b04f6d 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 ff9282973c6..1572917759b 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 67372cfcfde..f264de55ab0 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 c24fe735de7..3b04b0d42f1 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 bba9b0a20cf..f7e38845da7 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 47b7b6c275e..e6cfba970b5 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 0b63777fb33..97fea634c9a 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 e63722ce7f9..1e8c73d2c2d 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 df5b406e98a..fb6d34382ed 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 73249190490..a39b1070140 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 e78c278dcee..bae32a9ea75 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 2785c517426..7bc03d5aca7 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 4b0fd287f84..90fbb54eed3 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 dc722c8d4f2..a8f65176fce 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 a64a64f3a4e..f8734d615f1 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 a798aaabf7c..72cdf61ba56 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 d8b34cb7cfa..6b0d0f31f7d 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 eff09cd6a0a..ea49850d5fe 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 81159c4e107..aabf261cf0d 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 628266cca0e..cb79016cd27 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 354f09870f4..91ae5ca2fdc 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 65a3f9aa8df..c980bb34b5d 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 3decda02d71..c9cf396d0a4 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 d9afdfeeb12..a8f62b603bf 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 6d43b0fe19c..62dd2deef10 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 27760600474..a7faef95103 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 93b615f9f2d..5a7a823e1d7 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 187bc65b627..9afd1293534 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 39a984336a9..db01e617e69 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 c1cfde01e71..2743da5703b 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 1f89124a6b5..e19a2eb38fd 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 2f96c52335f..71c5d2b9080 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 c6ee8b59679..bd6ede58821 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 ac3e366008a..52e48e56466 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 de7eb695af0..9ff16c4904f 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 abf7cb76585..c9ba87c4df7 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 831c8c2bf40..ff5b17cf171 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 067ead44c9c..da00186448d 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 246454f6cb9..5f50ca89ec9 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 b403a6575b2..f15c26dae9c 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 b4a336dcf1d..bb09fb27d6e 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 934cac3d06f..0119008c658 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 487c2f8676e..3dc491e0895 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 f4d11d44e24..20fb9d269d6 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 fdd2201dec2..c914737ace4 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 092fa889010..26de62d06ee 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 38a22080e92..6147711b308 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 b8b6c7a9432..3b54866ed51 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 6f653a3ae9a..b57922ad61d 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 e2d9319a297..577dfc1dec3 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 129e918dfda..a34b5f1b9b5 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 9c2d7beb576..d9da600d2e8 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 b488b78541c..80da5f7e350 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 8ad74f1d0c5..7e54dcad587 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 40c4004d289..aff5b5eb021 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 e2da3580a96..e98b335ed0a 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 6114364f18d..e94175c6504 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 59c3c355fc0..3a33f9a0228 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 410565d42da..252a41b66fb 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 886493ab14f..4bf16a50c08 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 02947a1c257..8473d0d7cef 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 ad27d3ad3e2..64dac54dfaf 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 eb137c8d6b1..439a36d1713 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 98e1fb5c434..e9b25de9dbf 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 983f9a04e58..b29a76f8003 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 5ac3b6cede8..e8412b40e56 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 07bf7fa01dd..b06a01a661b 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 465a0e60f7c..d84af216336 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 d063b6285cb..af850952b96 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 2b99d89ee09..14131f60ca7 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 c8f17514dae..9bf60f6a9ff 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 ef725dfc726..54c6df5c7d5 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 7ab5cfc52cb..951dee3d9be 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 50476f2fa93..8962e26d6b7 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 acdb8a9fbcd..680c0d2ac5a 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 793e1e2f13a..330632b8dfb 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 c88ebf1d2bd..2d3606a1046 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 a4f17f84d54..8de06093e1b 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 8a81d282426..3ba08165db2 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 95ae39019b5..79b486f19a3 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 bc2ca01a1af..24a3b0b22fd 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 c680d4e0a70..c5b97cf1242 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 cdfe435f69f..572bcc42075 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 c8b8af4c597..b381f1c747a 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 ba2f770b359..89e0a332eea 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 c0eebf312ea..9e785403181 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 f5a3c6e2705..ff591049cae 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 52a8c6d4362..c6edaca4845 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 b983384a503..8c79cc8a3aa 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 84963a2c1b3..abd0778e606 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 27be612729e..d53e4a23fbc 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 09eaff48ede..fe7228c08b8 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 27a09121cd6..ef8e3aa023d 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 320e3d57cdb..04b6c5d08ef 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 7be282c94d9..6bfc079384a 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 72131b932fd..66f85023b83 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 d532170efe4..1a71059a2f4 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 d33ac15a4ba..56c455e084e 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 5a6df8218c9..66534288486 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 9c9272ccc17..dd64c1d7891 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 7ca09a0384b..2c6f03716c3 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 c2093eb904e..02c1dfdf678 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 69791e51d71..e8c472de45e 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 fe675ecbcdc..26139535e60 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 819d794be11..eea8510dba2 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 551093a97e7..98330df1987 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 8db9b612ceb..bebbd791c8c 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 896afabca47..aee6b119c4d 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 7ceaa6c7f4f..9621857eb4c 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 debf58bec92..7b5071a6216 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 b4b2be240e5..b93cd0c5f5a 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 92093ca2623..81a18e1f597 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 35e2f865f9d..e2c01967fad 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 9bb9b41d5cb..dcd29680abe 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 c4bcf7f10f9..c6e73a21014 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 ea6356fb4a5..521d65982c1 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 b1049f046a7..3c17f19de7b 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 82cdc738820..a3fc49e526d 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 ab23ea60bd8..51e720cbeaf 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 1f7122aaa80..f30d8239c8d 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 b6a84f2010d..162cfc47f3a 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 c848a97a72b..0f2ab08e837 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 e7e412ba9e1..ef45380fbb6 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 13f2a8d77a4..2555ee55e92 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 8833af0e8c2..5ba87cdda24 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 3070d2c12eb..9ff5a634007 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 1605dbee81f..3e30c529b5d 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 14a6766c5d8..6549aab1e37 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 100291f4c8c..3573285d01d 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 088aab879d0..c76ea77fe04 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 f7d4a7d374a..074f139a302 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 17cf104506a..23e802fd2d2 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 97e9d1f2ce7..91cf4583253 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 fecd40ca8a8..1759b22896e 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 648c83b885e..41f5994517b 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 de686f4892e..ec60863c380 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 2b8a8aafc0f..ff42f24b056 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 b1c359f2f92..806292b20f8 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 ff66e141849..9088529e7cc 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 983f9a04e58..b29a76f8003 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 bfcf8616acc..d1ba530b76b 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 5e17421c723..19dcd073800 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 28c1bff5d5b..332e37d412e 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 3a7c340d05b..81c153d7f95 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 54e8aa0607c..9fbde0a6bd1 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 3908d5f7458..6866d9179df 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 ec21d07af35..1d0b773e1f3 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 3ef5c222231..8b64ed20cbb 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 d9227749df5..328b045e09f 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 559090a1dec..59ff89e603f 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 6be52c8f1fc..5700755c542 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 68a27a70294..4074d6e0367 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 100dc1ed7d5..12df1f2f48e 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 e7db0d6ce5b..805418da790 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 db86016fe8e..60faa1048cb 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 1aae6a91aa5..d5af3ccb3ad 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 268e7c90c24..eac1b7b9c8a 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 c5faf5f5b93..35f9230c602 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 789c9ef91e5..04043654016 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 983f9a04e58..b29a76f8003 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 684a609ed3d..6a278acb8cf 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 85f9c97fd6f..e77f0f4d51d 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 b8b6be5933e..35156bc5e8c 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 f9377e6f602..65c1195813c 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 a6a879261e0..4c59b19e814 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 75296849354..795f66b218a 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 f17e5fddd9c..0d4ddd08ffe 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 ee491c87ea7..162d8114505 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 650dfcbe804..683288de8e3 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 df67bfdf210..94e235e239e 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 ea297da0884..d7545ac6a33 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 d9b14ddc26b..c9009398b39 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 1234c7b97e2..17f888f5eae 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 f61aa7dd02d..8d31793d325 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 409f8a398a9..98e283e13a3 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 2a6fdad40e7..256b7622f66 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 afabb9845fc..32f596c249e 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 9a1043503d4..87d4cd46f80 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 eb80064c8ca..5a53003c097 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 73389abbfb0..6b446b62b20 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 4b51f5c59dc..6e47d4d84ee 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 aa924b93c16..53de6440a9e 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 1a24d8abe20..0130b0e6073 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 0b2bcadcaba..7a590acd518 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 5a4ecf2958e..8038918dc8d 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 746c694812e..5e811367184 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 b51038d9ecc..cd0af7d8b18 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 854c81f7697..6938476544d 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 e6c440d5915..022c70fb2b6 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 1f0b3881952..64e435e26e7 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 bbf6d9ef5b3..1ff5ceea893 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 84963a2c1b3..abd0778e606 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 b07fea5dc45..49d813bf7e8 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 bd7c903ee6d..9cd9d2933d7 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 26a4d2a2b6a..c8f6f0a621b 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 90f82df0757..60bf6ed9a6d 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 8cdba73d5a0..a44bd9e0feb 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 7b6256f59ae..4757ecc5fba 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 be818b6b482..30385d309e0 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 6528eefcc4a..d7f1dbd23be 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 35f234bf43b..799d29a556f 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 70a97d4a7a5..1e395e26cc9 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 7b302b54eef..2d38b240015 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 9c8ad73cdc0..cb52f520732 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 ea86bf23334..fda025619a5 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 1a9049e72eb..a4df73ebf94 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 b5b6ab48716..bf212fec926 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 ce6a9e41019..4b36a218ed7 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 f47f6084ab6..afca0c5513e 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 5d767f1cda0..0302645adf5 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 29ab16d8f58..2d83631057c 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 71978b23add..7f8422e144f 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 850a1d2da93..037a0aff703 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 4eb3951dd79..6ca631c169d 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 12584141cbc..a520f1ea318 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 394f2e011d6..921a068f7be 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 23844545c15..bf500d0dcd7 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 560d7606682..63f58d80baf 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 095d278a540..196e02c31ec 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 f0511cde010..4f647e3b4ee 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 d962f68faaf..4b2ce3797b5 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 b00a4ed7e92..012446309dc 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 1271ab1c2fd..a4b0d55ebc2 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 3631269d0c1..a9d090afeb3 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 7bf750cb784..103354fea54 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 316d4d91ee3..82841bbf3c3 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 847e1975767..625fbad970e 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 9352dae8f71..71ab69f1c90 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 2d536e3df7c..229029f1d30 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 af9c28be75d..6316561aa28 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 1a964b8300f..47e18e5582a 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 2d330f06af6..4a35b6aeac8 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 01c69afbebd..8db2b21d3c4 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 bd73c2d2147..43fc2a17c88 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 44801e4193a..52803d2f044 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 8311e324114..c3a2d2029d7 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 81b315ae117..d53acae7a6b 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 cfaef8d5c03..70b67ee2f53 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 c13713f3dae..1c7d710b988 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 cc58b0eef21..25bc6152341 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 7e6de12fbde..43f2d948693 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 983f9a04e58..b29a76f8003 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 e3477359368..9cd7804009c 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 be720be38b0..f5de42f4017 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 5bcac68e1e4..0393aa57dde 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 e76c76bf0f8..512a9898f80 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 40c753833a5..242f7bc799b 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 27118e07764..43e7f2dc37b 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 a2eaba214bb..57dfd1a63ea 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 5f575b0ed41..4823eaeb492 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 6f532507ba1..6f271d08113 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 559090a1dec..59ff89e603f 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 186c73e386b..8029c092126 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 d888ead133c..2c97e0f932c 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 9b265afaadc..6155e31dca9 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 fa6a2b515ef..5d21eac456c 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 57230795e7a..20b62aea39d 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 1aae6a91aa5..d5af3ccb3ad 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 c465a43b953..0a6ad0e7086 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 d8ad402b008..d1c2917ad89 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 8c10f4dd007..14eab8f19c1 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 983f9a04e58..b29a76f8003 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 f7d28ef23f7..77af324f37f 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 91115a68b83..a2ff22e62d6 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 9db07f906f5..fac227cd9b3 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 2306bf9836a..9cd7ebe30a4 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 68a35db225d..672784e0558 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 ebf85e86951..bb7820f8d40 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 01932bd6677..0e17e6fc58a 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 bdf5a60a34a..422ccb22c99 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 192a8f29d92..2e3df695a94 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 cb1dba3be15..d59e454a393 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 7cbe677269f..3b5fe040824 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 887a755de90..5b093ac9f20 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 a908489fbd5..3bf394286e3 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 dd572905b51..0a024d492d6 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 41440f586c1..e0d0a70a84e 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 fcc741a4560..15cabffb149 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 923c1cc9cea..8d936c0c01f 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 786711f4141..044b530c19e 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 e83a33f52c4..be8a97274f4 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 51262d68066..24dba29bdb2 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 af159b59ebc..87df7901df0 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 52779f59bc4..8c47d2db5f4 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 6560c649cfe..7ea5fcf0cfe 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 e6a83c5a1de..30f0296dde7 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 db4b4de5a7f..69678813957 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 45005776b78..1f45773815f 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 44430fa0abc..414d5570ea5 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 8f945191c86..add3f305a17 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 f82418090da..2ca8084833f 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 45005776b78..1f45773815f 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 a65e91b2015..f4c3a3333ad 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 2e5a922a6ea..e9aca8ff6a9 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 f75cd1bdd2a..a1375e3f0cb 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 45005776b78..1f45773815f 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 19883878d50..d2d3650a013 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 e8c0a9ccaa4..5d0a880e790 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 cca198fd3b1..14e71283835 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 a6c0eed7630..47382823127 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 4b7eeb3fc94..a0b7122addc 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 d3e71113049..a666d8c8f1c 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 d87c37ff7aa..35d589957bd 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 e109dffc11c..301b2eeb643 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 9a6e2c14081..8fa871118cc 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 ecdb237563e..1c3e5488902 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 a74fed52cf6..989cf6c4563 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 78ca2c4c6ea..9126ac4b0d3 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 e7e7084bce9..ec27f3aafaf 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 2e73f475cff..98604e42900 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 09ecec3319b..0a4d831259b 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 b239853ee7d..5507f6620bc 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 02945e49d61..6d827c14502 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 138df0542b0..0f9f643db7f 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 23f242498d7..d237b940182 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 2a6cd88e3e6..4714c2ce849 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 4b796e0f91b..b0e3a9f180b 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 3eef85462b5..e9baa4967e4 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 79de8dadc82..634dcd0afd4 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 6f5305c0a43..10eb3cf3ac9 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 55a5c7ebec1..2a87fa025b1 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 6c2ea9c62e8..4e3adb7bb36 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 ff842872a0a..a1c549e3e5c 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 3c77561a5af..42a925d7722 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 2d95e5b914d..4a504d13d92 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 c2192e2df7a..bf58cdf17ad 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 96825bb1ffa..60297c3bbb3 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 de7c27c0d06..fce7f14b30e 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 55feac5cd25..b2553073cbb 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 b1e9c27064a..dd7ffbc0dc8 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 87227d6b145..af8d93669cb 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 7c3fbff16ac..b13fbf19303 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 475715b067f..004240fe9cf 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 45549ca3b7c..a4e1958be02 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 711905e8583..87cb0029053 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 d3e11c606db..34bfb5951ab 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 c018a7ae897..bcf5dbbad55 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 50558a8c537..ff27f01f9e2 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 ec57722f886..f5230e0f5f1 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 83cf20ad414..4e5f60109d4 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 788e67a9194..4c2ef571249 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 41c1a8c2d1c..ec60543dd11 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 80948b07def..d2c3d3841b9 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 34e60c2266b..0e28577c23c 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 cba343cd378..11cad2e140a 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 4ee5a5940b0..9ddeb261719 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 adbb32d8493..b754eaf112d 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 a8e1324beb6..e112c54c958 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 08bc9a5640f..ce94eff9b7a 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 f97bf902b56..12767e9385e 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 2708b88f040..dc63d4cb624 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 9bd596b155a..e6b4ada4b1a 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 e035068b3de..e3590ffd0e6 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 83a3c45b010..f338c50da6f 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 c4089bffc6e..715012c592e 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 937b7297b46..20881e38430 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 09c2e079b88..771fbf5ee37 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 33a9f074482..7a444b92a4f 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 4a80f38af86..c5a9974ab01 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 857394a80b7..19013d0c86c 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 a94337daaa0..8272d45a182 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 505a46a304c..201ad2c8773 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 5e71959c15f..10cefef09d1 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 020d54151ab..d95451880fe 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 d31689ebd66..c5743779e2a 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 2400b66a9af..ad6a41bd80d 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 c6ee8b59679..bd6ede58821 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 ac3a859e545..156dbe7f5ca 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 cd2f1c6f754..5dc0668110c 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 847dd1f80bc..4d846debe56 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 5e2ab9797f4..801f49c9fae 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 281e0523cea..9b92e3d4267 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 0eed31fd5d7..0aab457f7d5 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 d418fca00a8..cae70ce9ae5 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 514ea7487df..85612907acb 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 fb6f8c6fa1a..003eaef27ad 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 487c2f8676e..3dc491e0895 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 d557187ed91..9b4ae6c114c 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 734cc245354..cc86de72002 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 a547b392d49..4b44c773971 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 eb2bc2fc571..6e682006eb9 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 7e124a93b8c..5c0ba45ef00 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 c1f7a6b59a2..7ac825baaa8 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 2d8e98e33ee..ea7652d07f3 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 aa817b779a4..2bba196bf1b 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 4f55b7c689a..c7a7ecc5289 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 701c9f5ad49..37cd6c85b4e 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 21ed336e5b8..1b102afc561 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 3637136987d..fa303b3f595 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 efdb75fdf95..8bd61c1693c 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 52a89ee1526..4d747044e72 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 bf246b0ab5a..5d7f4dba5a4 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 ec1ec0fdafd..c771605a3a4 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 ff9d32157c9..5af9861f373 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 6bf9b80888f..aed09295b12 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 ad27d3ad3e2..64dac54dfaf 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 84793aa2d07..3b558b0ecc4 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 34a0c36b359..cf2e18a9a4e 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 983f9a04e58..b29a76f8003 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 1e2b2455190..fa9de4cedee 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 a2fdecfcfe7..2263d036f18 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 2ee04a84666..73d46b22654 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 effe300f8bd..a6901bcd1c3 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 e3f40391493..b6672cf6117 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 c198f0d6015..ce56a779411 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 589bef4389f..cbd2b4e46fb 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 6ba08118641..9cc7d9416fd 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 b8177744bc9..7a63bde629e 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 7045562597a..d9c0ff9500d 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 43a5882734c..50a1235deaa 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 e7cfda50672..fa6f9d54022 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 bddc763b1ff..d916df2719b 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 b4c7cab49d6..15e24d15428 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 bf3b7d18d1d..4fb41740696 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 246eb890d66..7b4fb148c85 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 8f408e82de1..fa7a8376aa0 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 8434e73e3f5..fea9868a7bd 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 f5c125465f3..adf29b9db9c 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 f41f56e4803..c0cab6527e9 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 3d469a50024..995e6e3dc12 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 a658bed9563..c0d5a33db1c 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 a405248471a..0b2652e2ef7 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 9e8f39a9e8e..ea5d1891fa1 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 56671938e99..eff76caac91 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 8a52fb98d2b..616ae1b6e5b 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 1eeb4f0fb8d..8282960261e 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 4d245e514d8..42f522a3232 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 8d2226095eb..1f2f2daf7db 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 56ff5828de9..fe1a2503822 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 4d3627fa2b5..c560045caed 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 1571d455793..a912e57643e 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 2eb9d2be328..94c9465d38a 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 96fd3072a7f..26de9de5881 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 e2cdbb91002..c61a43a4a7a 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 a60fee74c63..1f878685a77 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 625ccb04bcd..19f36dbee19 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 4df21f8bf1b..a10e267ed74 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 7676c02c7bd..b89d69012ea 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 96c1fcdc8f1..5ae3a055b2e 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 f710fc97501..feeddd8fb11 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 1e39279afb6..a2e081c5273 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 b5e29381361..3ee879527cb 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 ca37ed66f16..e00579f9b6c 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 096673f3777..6181b0fede5 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 8a66a7852fc..09662129e2e 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 950142054ac..aed0be00af8 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 84963a2c1b3..abd0778e606 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 14d8d440175..7aa7e04ce95 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 a7d81afb970..a8acf5dbad7 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 6c14054c3a9..7e26c7b5db8 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 52007629e81..54495c61f23 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 4b7ad454863..a40243bb8cb 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 54598bee82c..2cdda3cc278 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 909c27f4c93..4762a09adb5 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 1d950a183d0..8a0460b8ba9 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 899f52cd666..38e176a60b7 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 a27230d204b..102b1ff728a 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 d9747b0fc20..abc30a10c5b 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 21c7ae72f0e..377a709198b 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 37b2931d50e..efbfb6e514e 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 47fe1ce6723..bf749554be3 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 021a46814f8..bd399286308 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 4c739cf26ae..e70e88f4dbb 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 756fdc9ccc9..dd9e3a78d19 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 65362ecd764..53f22bd7c75 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 aa69d2bd9cf..1ec08302df4 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 1aff8c25b02..cb4f8d56354 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 49fb269ac41..2dab75f92e9 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 9a7ef6641b4..db904fbf369 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 32df0b6588d..f808fc6d2ba 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 9404fe8207c..bbe15dee587 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 52ca25092e3..7af8ca0fc82 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 c8a7fb0da06..9e8b7b563e1 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 4bca67ff081..539a921968b 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 44f5514fd43..da09c004378 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 b28a577be15..b2863495664 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 8d1dc0bb822..d9522d94103 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 24ae73ac230..3baa6362180 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 83c1465f4c1..1c9fdb0f220 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 5a9b3158f56..f131274a6e8 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 e1d9fd675e2..4a1aa4ed832 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 7dd6d7ce8ff..c9e569af272 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 9078cc68fdf..47017cc3527 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 fe2d8279c56..9a29cf43b0b 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 3773574430f..7e07f02d264 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 2c49686ebf5..61b5971c279 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 a5c1a779066..4f4a9e475e5 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 ff2d5ac949d..77bbaac3b64 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 16366085ee0..6552e109fad 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 5d04c05e974..1e08c9b0615 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 1e67b492549..edb1a0f6acd 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 eab939038ad..2eb9cf70ab3 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 e90c0527043..256df53f075 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 186b5b7d51b..d069ae65e01 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 cfa15b511e8..589fb69f6cb 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 2fdab2766d0..88a2a6ed580 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 983f9a04e58..b29a76f8003 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 4f3e47e6c1a..bed6cb706e6 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 8cf7e70ad87..40947ed468f 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 79182f3836a..df5d445ce3a 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 48ae8653871..6cdfb27b1ff 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 86e0c213fc6..da9f8fb6836 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 bf560146684..a1019474aaa 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 bfcc614c342..7766c69a86b 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 12f482e4aae..adc1d73f8b9 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 082e9e3b9d4..d38a6d813d5 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 559090a1dec..59ff89e603f 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 bcdb24c318e..73f2a129a9a 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 09d124c1b2e..14565104108 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 63a065256f2..8e9135a5d5b 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 3d1a1841b05..875efd02d47 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 82f8fda17a5..67f9c8963f2 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 1aae6a91aa5..d5af3ccb3ad 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 f0906bbfb27..665f55ecc0b 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 49917508dbc..84762b14554 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 d5b74f2fad2..e18a1638dc2 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 983f9a04e58..b29a76f8003 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 a7e6569fb56..2354070c459 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 46dd394b7de..23a5054afe5 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 8b04ada8787..ed2607c43a2 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 7da9153fb37..11b9abb19a9 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 8237d52eca1..3a3ba5463dd 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 512db0b9330..42f071b215d 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 4f47cdf47f5..79fdda340f3 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 c552cc61721..6ae035734d2 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 8f4cc32565e..0117977cdbc 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 624a280ea46..f5373e78223 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 44dfe26a2fd..451aff6523a 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 96465db7919..a83b53694ad 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 43d6a2f59fc..d22b3d2784f 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 6e33fa6383b..7d588aff2cd 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 facbe33f884..4ba3ea340b5 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 003b42a4787..fc825261a0b 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 1792950d168..dec988d4b35 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 b2419e987dc..9d5e7286448 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 d755b2accd4..5e31ec60c8c 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 ea7443b0d23..760f8efe5b0 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 aa83de730b2..6f7dc954859 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 9e081a9a232..27ae011f45a 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 651b0a448d7..8fc91989237 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 205692ff6cb..12076630dc5 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 8adeea76794..87c10076768 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 16add7fbe9a..47e94a346e5 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 9127cf566f6..8aeec6338cc 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 3b0aeed383f..9d2a313b832 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 4ccd864da68..45283784b7b 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 512f1181c88..db53b48d41e 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 8c321a38bc5..c9c7226fe44 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 af81930c0e0..2965edbea20 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 f6584e6cab7..62d6d899dc9 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 e6745d42a05..e08e24ddb37 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 a9f087e5af1..85a4cc95736 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 fa97b353611..537d6742838 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 a6c0eed7630..47382823127 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 bb86d461121..9d639f1b308 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 4f70acb4062..b3ccfd75a87 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 487c2f8676e..3dc491e0895 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 3758b5c9a21..c9fab0e11c6 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 185d6d538d2..a56f190bfb2 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 42020c181ae..b470f37a6b7 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 9570b6f2288..6555f4dcfb5 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 cc21e7cf703..203ae99aeea 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 3575b8c7f54..ebe8aab1916 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 610a87df60d..5e0f86d9979 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 5f75f614638..84e5b35c684 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 0d843093a57..b24c3fdf439 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 4f2edf3fb33..3be3e45a906 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 e35f2dba16e..d482195563d 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 ace15207759..8b427d9a044 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 48d8d15990c..7433ed2ddf1 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 2c6b1d0e8e6..4f4729e4a22 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 87dfcc45f49..4e2a8689c31 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 5ea2e23288e..43b117a9f20 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 baf0015ead6..789b6ee52ea 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 bedc19e002e..c0f10c6d7d9 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 3b0aeed383f..9d2a313b832 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 d3cb3341863..3347f84f877 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 6cc481316b2..140dd7714c0 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 8c321a38bc5..c9c7226fe44 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 7c4d37b6908..015b686bb08 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 ac3a5478291..01ec8def4ec 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 7cdfb46f464..9db049987ae 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 a9f087e5af1..85a4cc95736 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 5053e14f1df..c30caf3dd3f 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 fd1f0586a2e..920b558fa06 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 c0e43ad24c5..7b5dff05cb7 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 987668b3b45..b384962961e 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 366b856e697..0d673192522 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 285101b46a0..ae51b15bf97 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 477a0d953e4..fba853c82ca 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 a17e6188e00..6c91fc348ae 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 7dab6184bcc..7154e3f4e98 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 b4e9705cd64..c442e70f6dc 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 be74e724e0c..23e4398f305 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 b2d4022c9d9..3ef664c2f4d 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 baedba345ea..eee5e74ddfb 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 a82de196e71..00eaabc1ebc 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 2ce4f12778a..30a3f2b5bb0 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 dd7d14a8048..6110e9ef510 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 d8714f0bb3a..16e71b262ea 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 fd17b831d65..77504ffa229 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 01e9b87c26f..875b09733ff 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 2e1d76e027a..9d13d9942b2 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 8c4203afcd3..a847767d6e1 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 797123073a3..b2f3bb08af8 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 6cf7d52220a..5db6d977509 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 b106e0b799c..7c127cab352 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 9557cb7803e..beb0c3d3abd 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 5c5c4d003ef..c5dfa71dd0a 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 f820ef78af0..1c85935f844 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 fce0b83675a..1400f95c7ca 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 36e7b05eb98..dec8a93ec34 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 95db52e4555..6ad9bd69aa8 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 32472916de8..02d4ae83581 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 c6ac8c54903..e0e5bf6d33a 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 099726f979d..2eb408798be 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 01d11c35d77..965b7df9305 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 d192d8f267d..2472bb8d975 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 5a68eb3363c..e14595e4ea5 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 1a0640d841c..c6bb8969f64 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 2b21869bdba..5e13231732f 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 e29d9657177..c6f685c7b89 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 e74d6348cd5..d398e0e4475 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 03f7d799023..c523138e328 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 676215c7eda..99d126f7853 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 347d5bd2367..57309674058 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 2a211359b86..633114a97c3 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 2658b4e53e2..ef518c255c4 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 7404f1c3ef8..73119045159 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 5621e1cd2eb..ec242d01c89 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 e38dbc3de21..a12073378ed 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 f31311935ab..e80709db30c 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 de1ce3fd393..7d1f71d4428 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 b96df6e52dd..2f87eceec1a 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 7f50cec248c..e026e7ffc7a 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 d8ab0ebb174..957e3bf1560 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 c6ee8b59679..bd6ede58821 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 1f357e54870..74173a2e966 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 2efe0fc6dce..0e8dcbd417c 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 5fb6f19a4be..9b80c1fc42a 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 9d3cb4d62e6..4d40ebc9901 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 f61ad982fb7..a93fbd34375 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 5f52ba12ea8..46bd5892f84 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 17a3a00b5e4..871b86fc5c9 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 3568b4bfd81..c073c580204 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 e8ba3850334..9bd9ffc2c68 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 487c2f8676e..3dc491e0895 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 865c8a3b523..4ef2b440228 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 9f4b61ec132..37a93e9a826 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 dca9574c245..3d4e488eace 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 6432ab515d2..8b2901f6d95 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 08a7544db1d..f456894977d 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 893b858bbd6..9e61eb6679f 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 592cfb81281..4613d407660 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 685bcc5e5ef..b528fc6c1e2 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 047977a1d7e..a9d617867c4 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 746b0e923d8..9b4ac84f225 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 fb4bf5589cc..9cba9aa4a4c 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 30a5242186d..b8bc3d01f07 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 f46dcd091a1..6fdb256dd34 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 5aebd510dd8..87e2bfddb9d 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 5d6f287fd0d..325f8c0999d 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 58069c24545..60c69948c14 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 c98e65e0f1f..dc737b6c6b9 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 d4b422fe432..100f080c921 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 ad27d3ad3e2..64dac54dfaf 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 cf5af5ded5a..5ad2c2778a9 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 205e8f7f39e..e88642eeaf7 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 983f9a04e58..b29a76f8003 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 2a5cacd5937..ca42c158ea3 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 85adebfb28f..a12529e2b7a 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 bea3dba47c6..1974db9600e 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 1373d485572..6fdfac24f59 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 30df6561cbe..cb0b76aecde 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 aa64318af25..481ba93aeb4 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 44d71906a5a..2fcf874d6fa 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 eb15ca13a7e..395e59e1562 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 c5c20d90562..1e123ac1443 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 cff41466517..c5140ef758d 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 ef2f6ece505..0700219906d 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 19e0141147b..81426d93edc 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 67016792b09..e23f44c68e6 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 48545a32a3f..3db73a0afdf 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 41e354fa563..1c7ea58d7ee 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 a92ef988e84..b3f3b2a92c9 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 acc8a395e4d..392aef4cb01 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 31c823bf233..9705fd5a403 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 5c0cfa5816f..bec13579a06 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 5c675576386..ee7fabc7c85 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 489b30b6c02..d78d7072ad6 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 26153b34e61..4a5e9fc740c 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 69ff5791084..ed75925b251 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 cb110116e53..afe4f21e76c 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 2911383b4ea..cede4e25e32 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 349b6f7c313..cdca4d0147a 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 1edf5b8dee2..15a17ee2a6f 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 570e6cca8f3..8e168dac52f 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 5e91543e306..2c44f457d7f 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 06fe12c54aa..52963047fd0 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 d497a110235..5ea089a936c 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 6eea92e3b6a..8d574824466 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 744f564e148..35737874a81 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 11d86d89266..ff780de4405 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 6750f3c3158..b15cd54c12d 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 55e10e10ac9..8ca56960043 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 9d40a1574c8..2d50adb6213 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 b1a2f8ae528..1fe58823f04 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 41d5310068a..3b27d0d7799 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 c9f8a8e3e0e..06df3ca568a 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 39e6e99eb0e..388f349153e 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 e3c73ef93b3..9504954def8 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 84963a2c1b3..abd0778e606 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 542dab5a15a..482e4c4952b 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 f5f5e89df66..bd5e603571e 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 3ad242f0dd4..2a826246cf8 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 0b815c4e5cf..61e48eed608 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 34ccf9c354f..5a5bdc9ebaf 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 91c6d0ca448..44b64b4f27d 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 510e4ea6c34..2dc185a81da 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 becfdef4f47..ffaee714f12 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 1a6fab28ea3..9adddd22000 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 2adc3e3c3af..c22bb1bb706 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 81d6a01ed37..cae96ec3ff4 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 60fbda32505..cbe75eab33a 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 843bd102cce..d2ca66da0f0 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 3fb93ddea54..0aa90d496b7 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 5e26f90e503..e7e2f092716 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 923b5b5dcbb..3461931991c 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 a608eb4cf85..62568fbae34 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 9cc80fbe786..584663b6608 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 45162e57116..8ef28e63b51 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 4a388281b54..189b0b68fb2 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 289a703440f..7134ee5085a 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 b3d94ae0ce1..661fa709bbe 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 3ab9ac35be5..569a71991df 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 0c94c6b4b80..b380a62eb14 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 0be2aa15b8b..74931b65e7e 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 9bb452dc6f3..4cb647ac9d4 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 6743065713d..2598aba0a2a 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 34f86220f87..73b032a8aed 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 5e17d47df71..bb91e647039 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 90546541cfc..ea067086fac 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 a4fadf9e42a..235e3cabafe 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 89714dbfdc5..4635838f337 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 f94ac797d59..2517a0bc3eb 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 2738cdbbf99..d57ed26a723 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 eea82deeeb6..fd02052ef68 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 66a7daa9be7..afa48ab0eae 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 bf142a9902d..c61c920b666 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 8cda6cdca3d..bbd95907de5 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 9e539576cd9..ba2c1d1ef6c 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 c7a9da84573..8b20fa29df6 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 c0c8aa79305..f365272f2fa 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 1455eb2ba1b..1028c1809c8 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 c307ddc6b74..00aeecbeaab 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 a1c35864919..e6822b7c5a0 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 4083c0a82d6..5533fd3df53 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 58d8c255ea2..b337316fe98 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 f032952444a..9f029a9c611 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 cdb9138895f..0cb445160d8 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 9700dda52b7..dd7ae8c597a 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 983f9a04e58..b29a76f8003 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 cfbcf0432d6..4c71444a998 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 d117c3be722..f746aa5ed39 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 096059b8909..e427a9f787e 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 724f84d1e7a..60c2227f7c5 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 5038fc69b99..5db6a775c88 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 6249934b3f5..15070281004 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 93ae5498f69..794db9a7810 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 61823b398bc..69d264ff452 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 c7fab9d6ee8..8e5fc8890da 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 559090a1dec..59ff89e603f 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 f8fc7db8a2b..ae34cfdf332 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 c28d95d14ab..aac760785fe 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 2adabbf99e5..4c7ad9f0e43 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 6b840af6c73..8bf18404d75 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 f7a9e6442b1..e5f64f44047 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 1aae6a91aa5..d5af3ccb3ad 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 268bc8171b0..2cbfefebf42 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 eafe0f4b2ee..9c9486888e7 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 cddf13572dd..6332bb61b91 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 983f9a04e58..b29a76f8003 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 43d8e2bb288..ef27c9d13eb 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 501e4872edd..ac9204feb0e 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 6d69755184d..09108665794 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 958aad8b8ea..c5664078873 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 282efc7c15d..10ad9477673 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 0649c61012e..f83cd4a8746 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 5306e1b6b7b..86215dc75fb 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 a9b5a72a91a..30bf93013d2 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 cd304761a9e..408a3fb19bd 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 624a280ea46..f5373e78223 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 d3b066ba0da..79c04ad948c 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 9aba8d168e2..cc39637c130 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 949b5d51eda..d659241f426 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 0f861dea55b..616265e1d26 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 facbe33f884..4ba3ea340b5 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 720169fdaa3..9a6ff2d05f2 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 4721e6126db..784e15adc2e 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 8850ff110c8..8d949007369 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 8e8abc502df..6b8830f3305 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 5f101408b3d..77caa2e5408 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 88432183cc6..e2980cf535f 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 970ccb54ebb..9fab20cc774 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 dd35de50932..7fd544d8a78 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 4938686eb71..fe104415340 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 b03a4173527..46a29a9f80e 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 bd3b464df36..c1c0cbf557a 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 a220ccac4ff..3f16c046667 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 3b0aeed383f..9d2a313b832 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 de2a5a84a5f..d73153ac641 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 277e71fb0df..d5d57ccaa8b 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 8c321a38bc5..c9c7226fe44 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 2245425c1fa..b5acfc5a0aa 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 9efef74d5bc..9067b80acb7 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 3ff7ba82e97..c268ffa8038 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 a9f087e5af1..85a4cc95736 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 c2b99145aaa..ae2ee6c5a75 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 a6c0eed7630..47382823127 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 cf37036b807..21b68757546 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 85a7a843dcc..ea82ac94bac 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 487c2f8676e..3dc491e0895 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 b47cf7354b4..6b9ea7091b6 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 fc9c27618fb..2b84592f2d6 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 f430dcc8ad9..5261b34032a 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 1f69ccf3315..dcb347caed7 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 7c75ee1c30f..a5142a2edf6 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 cc64cd4b60f..f179dff15ba 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 e965b98a76f..7b62c8f01b3 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 00b1ff806d5..67f1b7563ad 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 ccb0081aec1..7050f9cf862 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 cacb06256dc..756856fb26f 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 04117efdacd..50085c5473c 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 24b12a7af0a..09a304aae0c 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 b9f3e76797e..4854423a12d 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 7328a05beb4..869f738cdb9 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 37f80c965e2..89c27da2af8 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 a425017c090..94cd84bfa72 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 fb6e0047fea..bbf9a6ee5ce 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 bcd8e0c7908..1fad8967f4d 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 3b0aeed383f..9d2a313b832 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 b233a796ce7..6eeaf37a513 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 77957ee063b..108ed8c1cd7 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 8c321a38bc5..c9c7226fe44 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 9ea0805cd4d..ca456b40990 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 19887eb1d2f..78220555482 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 08f9fa7468b..e29d595d695 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 a9f087e5af1..85a4cc95736 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 9785ddc3c68..061774fe74d 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 04ea09cc2c9..af7ff671ae5 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 a70abf6cfc4..e1c27f0e1c6 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 fbb73ffd140..da934f8cffe 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 6d8dfc82a7f..f443f0da40e 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 29afcaacac3..c576787d061 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 5784a0ea374..5a00c3e1e7c 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 ee8d67b439a..3904aab9c47 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 d81c7c0ab20..a14fe6c511f 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 305e579d401..574f70b047f 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 ac061262bd3..4b888de02e3 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 519542c0ef5..4033616a5eb 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 f78d07111d7..24f840098cd 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 9da7b0a6221..7d62aef6072 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 2a1385cc67d..b798ebbf773 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 23f214e9235..b3f2bd14bed 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 703273d744c..b8d9b64237d 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 c92c51b6ae8..e6e36d5fb37 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 3132909b275..9917e40e8e5 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 caf626ab39e..36f2ccf50d7 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 00470557b81..368fd3510db 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 eb5ffe79ff1..74d6568d1d3 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 2e7e69b864d..792e3c3114b 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 f172435d6cc..0fee23fafe6 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 013254c07f2..c9623607c8c 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 33679f51fdd..94008761bb1 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 443a72f88f0..3e5072cf09f 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 78ba55a4fd7..21ed61d9510 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 f249a9e3d67..464d6862662 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 d2df1b28b74..61e6cbef896 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 c7616dc1226..e07b10c5f98 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 c4e81231edc..4d2202405b3 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 eec415c9fd2..e94ec081c23 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 42cce48d674..60497a9a060 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 279ccc42b4d..d447d5239f9 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 3e970d3dae7..c78d580c30f 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 b0880e0e5e0..92cd822b984 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 f16ddf60737..92e936b5297 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 3869968829a..0baf6805a59 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 d3fb417e25d..35cb94653b5 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 e128ac8627e..56d771b81f3 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 8b17b18e00a..4fc8a90751d 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 bf80209e3d5..880cf658a58 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 eaea0e754e3..31a1c3d1841 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 1b3223dc8e1..ab82b9c8f7c 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 180890de5cd..922ee9890f9 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 061d324b28a..7b62cd006bc 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 687854e2cb7..066de424afe 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 315bf685b04..4eb46131b68 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 74b3fbdb3e1..c58529001be 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 1f5e1f6f052..61647ed7f22 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 adf35f5cc1b..198d27e3a88 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 77f6b0cc2ae..63a36699483 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 51fabca429d..ce4da40ef25 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 730b3d19cc1..311b47f58b4 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 6e5a2abd2de..625dff3b868 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 3315fa0e581..6254d3a3464 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 7490cc99487..4d909247bde 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 8f7eeccc890..0d7f41dee31 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 a08121dd1c0..916d9007d2f 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 db52c25c4c5..6b2a72f058f 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 47848a1d0c8..ae670a1cf69 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 e0922c549fb..2297453faf6 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 aaceb989993..78fbc8e69d4 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 03941ca1932..d91ab4af3dd 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 2e3ce59d75d..62838bdb731 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 be20aefc100..2c3c9b3cd10 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 b63300b66c8..1017efdd725 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 4477fe60516..f32cfecbd9b 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 e2202e80821..42dec1d2203 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 3132dd3b1fe..3b2c6a2de08 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 46fe448a128..01e941a250c 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 e7146ec6ab7..7e6eb6f77ad 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 4243d737ae7..d36201ac228 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 074cda9e27e..b73ed52b704 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 2f41195b229..9ec0a3ef9f0 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 241572ccc81..b9ca4037c77 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 8c1d3b940ba..ae87c52b0d4 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 16dfe92a582..d540b8114b1 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 935ac688fd6..c580000a18c 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 97947239cd7..e5c5191d566 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 eff09cd6a0a..ea49850d5fe 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 5c79bf033ba..06ab6e2d85b 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 71d06081db9..8af6506c00f 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 0a6d8ce67bf..440368cce40 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 efc0c68feee..7485bbe1a2d 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 deb64661a9c..d4ee225e6e7 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 bac7d733c29..b4621c7cf95 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 839b793bff8..c2718dc6b5f 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 000f2f4d0a2..803be442a31 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 6c3674fdcdb..335803642fd 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 f11b224b310..d4d661a4bc7 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 9049da893ca..a77e1d38d6d 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 696dd2e9352..f28a840f212 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 47565215e18..94bb480b173 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 a2be97728e5..1cfec4d9497 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 c6ee8b59679..bd6ede58821 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 5e353ed7628..2432e26e895 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 b227a50f19b..481ed2afb39 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 92a16d525a3..f2fbacc86db 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 b4b2dd872d2..6a1438abde3 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 cf2f4570606..61c64493329 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 c3e627140d2..1bc6885fdac 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 83048b2ab98..1d57de1ab49 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 51e5ddef739..cae2443981a 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 2603013beae..dbe675a5f28 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 487c2f8676e..3dc491e0895 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 9fdecfe4ac8..3c86e7dd96e 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 cc44b299d10..5e5f87269ec 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 b7a17b7673c..f988b3b62fe 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 4bd1ceef767..3a6b26a3433 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 5e0fba4fe0f..5d287fc7bf8 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 b370f2026f3..016f720a020 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 cc27d564411..64ad32ee2bf 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 a4de9305034..9d7e2fda7ab 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 d37b0821d2e..799be596b0e 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 0139bbf712a..a06c2061d1c 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 9d9b8a5039d..b286621059d 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 a24e9053f67..d27582f7a2d 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 bd0c1acf5b7..a2065b851a7 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 e27ded5952e..dab3cd2f612 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 556e6681208..749ece95fd2 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 9a08390ed96..acb3bec7ccf 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 b5d96016dfe..9cc17b21fd9 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 7f361ca6dec..3e70746811f 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 ad27d3ad3e2..64dac54dfaf 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 a8b031d39a5..4dff60d052f 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 5a10170cd96..692a1985d6f 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 983f9a04e58..b29a76f8003 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 e3889956524..d2f7afecdba 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 3e9c8cd0e17..e9a2eebbef1 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 10b8e17f85e..b3932eac1a3 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 ebf795d75f8..59eaa7bc78f 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 b36e19c9b6e..e73d38ba220 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 7c8fa72d52f..a87f3a46077 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 8d4830c4e15..aa3c7446268 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 23d6440924f..40841db6cff 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 5347feaba09..772566cdabf 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 84b4574bb5e..e1adabc8b68 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 d8c0bc2f4b9..0dbbb8ca19b 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 795a071f5cb..cd02b946e25 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 68faf0784ea..edd5a30cd3f 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 596fa48118b..31b447932ca 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 dc48879d6be..ec56080f713 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 f8f8be37a3c..aa14e44e4e0 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 f5de5f245b0..ecfd112a19e 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 d6cef03d2cb..18426c1106f 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 7eac133d5a1..27e71ca5afc 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 8e7cdf28c70..213b6a4091c 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 1bbb08dbaa6..732e843d673 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 55eaee88929..0adadea16ea 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 4a055355451..812a79b6adc 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 77a6af97a81..e12bdbe1d88 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 00e1faab3a2..3b837eee854 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 0ed41b83043..824c1cc5d2c 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 207f192dea1..f667c5b15dc 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 a3e7cee0c40..36f86765d5f 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 be04ecafdff..81817ef2d19 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 14dc2bff351..ad91c78d866 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 378b1c16235..4b7acd97756 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 ee96926696a..bb517deffec 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 fa36c533064..9eaddb5105f 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 604a863209d..182977e0121 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 43f8e53b65c..1aa9e1b22dc 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 2924d289a0b..7fe97f61915 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 9b9a60aa98f..25819a3d266 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 6051312b15e..9abcce84cb8 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 c16808cf2e5..e6a843dbc75 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 84963a2c1b3..abd0778e606 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 135dd3cfd4b..b5bb346f45f 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 d9c2e44eb3f..cc343929dcb 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 130dca6210e..e97564be06e 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 4355798ddf5..e6100dd8eaa 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 a463a3f59fc..ea5cabe805f 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 0437a94e356..7e360b9ec35 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 b36aebe0254..f2fc81279ee 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 b4cb5958499..441290ecbee 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 e7f39e7cf07..5de32aa3378 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 0deba37b3f4..3540cf65447 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 b954098131a..10ba396d283 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 356a007386b..380996182ab 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 21a1a30993b..216e70465a4 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 636945f9cc2..918a3ca691e 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 23ecc700232..309e9225bc5 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 c190c53c7e9..61dcaf4d5e6 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 6698dee9d98..82491758dd9 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 68126cfd78b..9d6163ed832 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 cac68c1ac61..7225abfe9b6 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 9f617b80207..e5550e50db2 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 d65a6ee2898..8bdbd40470e 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 10f293b9d14..34b24330799 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 c148975af24..0ebf99204cd 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 fd20a78b8bd..289f02b2a88 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 4a5d8610b54..0bd884c458b 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 30ec7901937..e2a54d5963f 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 f30d2a4a4a5..e6085859f47 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 0b49293c269..5a404701078 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 9795603f440..ee66018ad10 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 4794f7a8853..05b80b6b8b9 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 b5ad722fd9f..c8ce2690e42 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 40dc2dd7d38..45619d4394b 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 283b7622a15..4d33b82e519 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 a2205a0f1b6..bf05d177351 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 b226433c98a..f19542d58df 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 960bd449b88..9a69bfbad3d 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 17b6a51df5a..aa725b89421 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 1ba9c88ceef..237213268ad 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 a02708c1199..e8d2a753385 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 c8e8eabfd86..48bb7c1569e 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 30f10067d5a..65461c6df10 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 7ee79fbadec..251afc6c8ba 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 bbad4b4804f..57b82af3fc6 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 73ba29a90da..b8c5b9db0fc 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 e89ef2a3722..3ecdd734406 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 90c433894bf..221496de78d 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 3bddde3f8ca..f4f5307453b 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 2f9a1fc6e3d..1031c92abfb 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 3daa43429e5..4ef93b50254 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 983f9a04e58..b29a76f8003 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 d42e6d9c260..02bf89bcb3f 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 7149bbeb0ad..aeb3ff27946 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 3afc2777236..a913ebf37f0 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 37401438b02..3f4e4efe508 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 d11e00ace6f..a5b72942b66 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 a022ed0e12d..010b26ed530 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 af35c934a08..1416efe2d6c 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 84ecbf71942..0a659fd0920 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 dbffe74e521..e4df33689f3 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 559090a1dec..59ff89e603f 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 dd58b4cf788..cf6e520db64 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 df0313ac904..7d8598af6a8 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 2fd7f9bf94c..7b3a6c56964 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 f9c49037dc1..aa8cebc3c9c 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 934607310f6..ce4290e5702 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 1aae6a91aa5..d5af3ccb3ad 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 c4fb853d764..29c957e4e14 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 70bd4ef6028..c436ee65e9a 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 0a927f15c5c..6bb67ab0f81 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 983f9a04e58..b29a76f8003 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 3a92d6f498d..5dd7d507be5 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 9c17a335b71..18ac74fd2d7 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 910c905b08f..4bd34c5c7d8 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 011c7519b41..f21f0fba083 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 2f71c2933f0..43394da66ac 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 188832bee2c..a179c73c1b7 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 88f5e6353e8..6066753581a 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 5758582fec4..06b95bb2715 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 363c83bbc90..88eb0cdbb7b 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 facbe33f884..4ba3ea340b5 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 19028a7c268..aaaab3bed84 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 007da2e6679..c5c1e26ec60 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 6a343b75342..a39cadd2d82 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 43d7835e08c..418b322270e 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 f9218e27c3e..233185a3510 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 f5cf89699b4..8de805009d3 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 3b9952080bc..0bd8379c882 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 34252afe159..c36aa1cd410 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 d4ba88bda17..03976868786 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 5dd569a3cfa..ad4dd7239cf 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 07beed70c6b..529ab3335e0 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 6a958688f94..dc1950ac028 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 3b0aeed383f..9d2a313b832 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 453b645ee07..309b14827f5 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 991fe50840f..49056a47c20 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 8c321a38bc5..c9c7226fe44 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 2d74f776414..30dc0cadf8b 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 89e9327135e..78e08b797bc 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 079f6596ee6..1c334531f66 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 a9f087e5af1..85a4cc95736 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 2b0ddb4b801..326293b0b85 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 a6c0eed7630..47382823127 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 87bf0337c93..b517df18a04 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 a0e77589f17..889ab8138d0 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 d87c37ff7aa..35d589957bd 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 058ae70b602..a7f126b9eb9 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 57213b2c665..44f1fad0c69 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 c3e8329ef23..f4d7f1c2f70 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 55b4c298e07..a9f4b5581a0 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 62e1ccaa259..e3475da0bfe 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 d185e1f036f..0649611b74f 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 c4be2a30359..37aca70f63f 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 2d649796096..f4255fbf0f3 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 8693fa2a379..5a13741d30c 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 fac0bf44d0c..cb2006600e5 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 fa3d81512cd..b4c05b76a1b 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 f0a525f9ab6..5e2cb926fae 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 3b0aeed383f..9d2a313b832 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 4b67a89b5ee..6a73ca0d021 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 c34ebb48b2e..4085b44b60f 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 8c321a38bc5..c9c7226fe44 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 f6a9651ac86..704651c9ab2 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 d0a50492951..348e3c24913 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 18e0e6eab61..cbd695d3f09 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 a9f087e5af1..85a4cc95736 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 6527b051d21..87c7c295d07 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 5abe04051d4..8d6c1c2da7e 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 8f77832b6b6..072b349b336 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 f319ce45f43..98d1ff36101 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 f41f4971e8a..0224eba7d82 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 d2052fc9528..87576b61f65 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 e9b8121ae09..78321c1eb26 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 cb9f598dc37..2b2c1d2a6ca 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 6a63f142fd7..cd12553f2dc 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 0878641077f..a118f21e0c9 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 9ef6c559884..a5e7808bbdc 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 e1fd26b410c..e9d0cd61e5f 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 f39a7558dfe..d0e821dafe1 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 9764f51916f..14e6ac55f0e 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 e61d5f85ce0..7a9695a3705 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 df36fec3551..7e68a9623f1 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 ade0b467b7f..639e2d864ae 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 07e47d52a4c..b88d29ed1fd 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 e1e7a21a617..53442e3f489 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 fbd246064d9..646106bc4c0 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 60613e2997a..1cad8b767fd 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 c15205a7515..2e82f70313d 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 db44e123dcc..422eb01757b 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 e2dd0ec25fc..99c0eb511c1 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 498db23d305..1b6a33763bf 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 6a31327ceae..fb6f49a7dfd 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 66bda2b3d41..9b5e00aa3ca 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 58e5abbd339..cd27019aeb6 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 f55e19922ed..7eb7c5ed643 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 ff32888d943..0f51d54b99e 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 ce5b289bb67..c268937edae 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 68e75dbfd9d..033dbe58907 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 d35e4dcc96d..4ca78ac1b1f 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 18312c5b1df..0495fb57b0a 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 dd8d4212dde..c9a114724ea 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 c0ef7526673..435d4c3e6c2 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 38eb4fa9dba..4fd0d6fb664 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 d11f34a6204..6154b1250cb 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 b0b330dc89d..0498801e00d 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 74fcb982a9d..7414d64b63e 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 9fa68efa1fd..05649620dd8 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 663d2f075ca..25629104c75 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 b11f4e2a83e..d6f4142b0be 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 8bc4aebdf3d..46a956316f2 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 b2486f30474..644e50eca4a 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 0a3b69d80aa..757cbd3403e 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 99c53576596..2273682dbea 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 deb45a81af2..101b9086c45 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 b8bf4a914be..74c8a1755ac 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 e8f530f8e9e..34fca2d007a 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 a6ce5aa7fd8..a471535d9c4 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 dea17ba84e8..20c53294d10 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 ad034a4ff88..03a61a4e4d2 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 d993f177477..19763890a10 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 c5ef3dc0ff3..75f712fce63 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 0f94bb99a6e..3f2a7d5afdc 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 d4b2a3d564e..01c549016ba 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 ae6e14f32a8..993adf44434 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 faf58a49251..e92977a6361 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 2a7048bd55a..a453b8c4209 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 c6ee8b59679..bd6ede58821 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 29b4e20d153..86932cc7aeb 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 9c881e4fb9f..98696ac59a8 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 9bc27168a68..cc86ffaaa6a 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 5d64e9c0cfd..3aad24778d3 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 3596b436815..52e2f53760d 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 e14a4906403..1766c00ecae 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 4df641bde95..24f91cc3415 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 8b7e7a0f5fb..4dd8cff1ea5 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 e5cf1ee2863..47117831f67 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 487c2f8676e..3dc491e0895 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 f4046c640e0..b376274755c 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 8eb3be01567..184b90115ce 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 e4da0804a69..7bdd5afbc43 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 697e132de39..a31c652ab14 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 1da7c967b88..2a3a8a4d06a 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 3e30fe6c372..74165616a1e 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 5ea5c3b7d81..7b352277726 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 a518996fa66..d33dd10b315 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 1b9fe472a29..405c7580ed9 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 1a16679b4e3..8d928fb5eb8 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 8f72f4481e7..5990ac911f9 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 a1f6b8b72c5..440db4665b4 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 4649ebd868a..478937cd6bb 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 3b2add60539..fbf070f3276 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 5c5693429cf..66d74732090 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 c73d29a6db2..9b2f2adaf10 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 4f06431b6f6..3abce402e41 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 6152cc52872..0cc88f21b15 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 ad27d3ad3e2..64dac54dfaf 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 b4c3e7a89fb..98db7fbc5e6 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 2fef42c1932..af3e048e49f 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 983f9a04e58..b29a76f8003 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 4f0d423551d..d60ae783c48 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 5b4f40932fd..a2c9155095b 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 b98b6baafa5..faf227a2fd3 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 74ab48f8b08..2670e233f98 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 511f327a282..3d21665554f 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 cde691b49ce..9fbfbba4dc1 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 23ba65a9989..dc7b03c2eda 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 7021092c3d3..b0621c58969 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 9e6f2c9c816..8dacc3d63df 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 63a516578b5..d49328faace 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 ec518163174..e746ed7cca2 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 43b6ec3591f..b3a15d0e9b0 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 1560474e41f..22d40af5a8c 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 82eb5883733..751a9e48924 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 c8888312e21..a1722c2383a 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 9b33c61f034..81b019a27df 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 aead9eaecca..619add39806 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 70a73b27b7e..1149485f403 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 4f7dd5fa236..828e04fa861 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 9f496299131..b2c01eee04e 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 84c56d57c8d..3c4cfcfb8fa 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 d4fefd25668..a32b638d860 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 4cffb019361..6f6d2c8ef92 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 fc17b1b5114..4c0618468ca 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 2475facda12..12fa32d5dc3 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 4e879f8043d..acd7588fc3e 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 04896701e0b..1f199dbe182 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 b5d305f9264..7ae65035205 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 af3e5abc213..6300f95402a 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 75fa2cc9eb5..9980f4d66f5 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 31c07b717e2..7d16b82d72c 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 2a7ccd99dba..702ed086fd1 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 7bd38b5d493..8fc1cdf1270 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 167ef979e33..b66cd30c6b2 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 940dd1adc85..6de2865a6d6 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 44ec16ec9ce..0fc75b540d9 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 878194d24fd..3982ed0a4ef 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 84963a2c1b3..abd0778e606 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 6cd837fae41..4f9f549be3d 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 817f4a3261e..1ef5e919e48 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 e13a66c0455..5ca3b03a33b 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 2107e5928c3..a8c42b09676 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 ba0b8e0a609..2c549664578 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 e787dba6546..02ae9aeb242 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 a7aa81599e0..8e2683c54f5 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 27487baeff4..e80f476c970 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 7f3b748daeb..32ff075029d 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 ce86070b2f1..b38dd27ac9a 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 4df6303dfb5..42b8d1a777d 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 0796630e3db..8923db43d76 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 049c4df1f8a..445445d4535 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 b10abcb9395..1794e7bbeb1 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 6f17a280bf0..4816bf445c2 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 ebce23113f0..8b42f1c204c 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 144c21773ae..15e19f9e50a 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 26473b2d460..aafbe8e0949 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 3389d0ce71b..085d569f7f6 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 2bbae3981eb..659035754b9 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 a2fd5c42a5c..ac6c0b613e6 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 2e9082337c9..9edea3f817c 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 196a3382380..d917f1a4f8c 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 d8e66d22bf3..1fa23ec513c 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 dfc46830a5a..4e909a815a7 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 e8e646b6546..17b03976a61 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 8213517155c..d91620eb30c 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 3fbb3a38610..e7984664343 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 fa873a7fff6..1b9ed444f37 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 c6cc44d50ea..4767af33f37 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 0f2c0e9662e..a33bdb5a2ea 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 cc7bfa57cb7..5e145b34bb4 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 234d6b6977f..df5af1534a2 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 9344604f836..afca9b98b57 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 c3853b82641..055f5fdb078 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 bf758dea214..2d06a4d69d6 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 6ad9c7c9505..0ee3f6a2956 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 971c1070ac7..237d490416e 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 1c8c6af3c83..37cb70068f2 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 99db01c8d11..5e0802b691d 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 fe3523b7fbe..70ad8ad6bce 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 a30ad917da4..678d3e43d31 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 bc329f9bfad..dfd7dc3e484 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 67d61b4fc90..28a1af402fb 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 4b83341586f..2f1e5676b88 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 17d74d9cdc2..08d4db40084 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 058a2451e5c..9a67bc9283e 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 25de6732122..469629d47d9 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 692edeb58cd..d59db34eeb2 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 983f9a04e58..b29a76f8003 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 ec378db7158..719a6a86a9f 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 2ce2c8a5ea0..772c62c8067 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 c3e2c98e308..b9722f92d34 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 61568938275..d9d1edb5f04 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 ea700bfec88..21bb37d6943 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 d56e408d27d..93341d05f02 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 916d34bd90a..8098212b2dc 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 eee2dbe558c..50b7d8282b1 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 eeb6bcd397f..1fa0a64850f 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 559090a1dec..59ff89e603f 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 7cba676b0d9..be52fc99ebe 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 999dd894ad1..fd129e23401 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 43ca86bc531..36c4265f2a1 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 7b58f36a966..cf3cdbdf090 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 b685d10f293..bc1bb615f6b 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 1aae6a91aa5..d5af3ccb3ad 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 cbdde43314c..2ac2d1b22b6 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 1006d026f4c..f357b6b3fc2 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 b040699ac4e..826c88e11bb 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 983f9a04e58..b29a76f8003 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 36d0585ea8f..6ee9c013c25 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 857033b41df..aef9238f06d 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 b6b54255eb3..65b050e4822 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 c1d0017affe..96ce7083d24 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 45fa89752db..72b03e1002b 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 f4e2a297b92..940a85c5abf 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 3ea2d402958..d4c4be0d4a5 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 ed5b4fb0e5a..180ad121698 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 b324e804484..029eb275384 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 e9bdb89f26d..20900abc1a7 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 d8c13c04f06..65f6d1ebd43 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 8c321a38bc5..c9c7226fe44 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 1be4f77e98c..6f16e1a3670 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 ebc2f57c675..d9f0a96ced0 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 0cad239bad7..428d77eb8a0 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 a6c0eed7630..47382823127 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 3c805e0ae64..d85da6b8b83 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 1187bbf7476..fedd3f71654 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 9301c0688ce..13cbf9ae54e 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 995e394128f..27c7d3da95f 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 e2982376116..5b88c2809ae 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 69c62feba40..5a3bdfb9513 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 ca1f49fa285..098a024de26 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 27cf0506c58..25d51677b01 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 e9bdb89f26d..20900abc1a7 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 51971a7f67d..b8000230cfb 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 8c321a38bc5..c9c7226fe44 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 20c1ae57cb3..49532186de7 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 f1d964847a0..897a24713eb 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 9a0a48c2c2a..d3ffd3e4eae 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 5abe04051d4..8d6c1c2da7e 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 342cd587488..4d3e3e16e2d 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 3aa413320ef..d96f4ff056e 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 e7ccb84266d..4c64970c432 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 25a7822f448..c5cf96fdb56 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 9165d844bc4..1bb4751c743 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 61b0c4a0247..b35f0c44b61 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 68509325dd9..7789b90b4d5 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 5f31c98bb4d..c5dbfce610f 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 ca674e99876..cbc059160e0 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 d64d4726906..4f31a2951bf 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 e852a325e04..5d79897676c 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 e9bd881f568..864bc78510a 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 5551981a296..1d31872b291 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 793d83d5476..23dd34d9619 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 69ed8265a67..d7786690a8c 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 ab8392b80c6..48396baa65b 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 b42e1bad00b..3730cdb0b89 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 0b8b1ff55a2..18307da81dd 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 61eda251e71..8bf4322a6a1 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 3f0e17ae1b3..759ea4ab99e 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 081389079e7..eabca11814d 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 9b6de458f80..987d08215ca 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 30a7362088b..2ed0f2d3b84 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 0aa64d96a0f..9ce4bc780c2 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 3b2bfb0d0f5..4cb787c8951 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 54262bf32d6..0f7d104dc44 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 40b321ce546..20d0284e584 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 359ee67e58f..fe0e9fc072a 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 bf6b4fca60a..07e757e3ad5 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 e0d4ef26e6f..46fbacda13d 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 6088c21e6ec..378bf371439 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 3fdf2477949..3c54de93f44 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 5117d010b92..0990ecfe39a 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 284e50bebfd..223fcb105fa 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 f1be8c54715..37fcaae5143 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 5726a169f76..312d636a902 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 3a32042c1b1..94dc05b30da 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 3943319278c..aafada85230 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 6bc7ab76fc7..b43b8b1d090 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 14895ddd3ac..74eba60501b 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 114f1560a53..6773e3d7772 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 a41df0ba1fc..85c7f9f597c 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 a49fbebb5f3..c0c463dd091 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 b8049e2a334..06ead5cc1bf 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 5bdf0a84351..d903d53e9ac 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 3e4106cc450..25ac4010779 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 85640767fd9..df6ab057696 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 e8f530f8e9e..34fca2d007a 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 6c6c0bf9eb4..5721edc58e5 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 f433d59b6c6..5cbe1b81be3 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 52228a271c7..abf43652b76 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 2cd73397ad6..a031c4df5f8 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 a6d4ee5b687..a0e7cb3b3e3 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 d4018d97cc2..c9ff88cdf90 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 a245ebc9c72..86eb1c70e0f 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 27c6c408627..b09b8524676 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 0a594ea83e4..11a4acc24cf 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 84ecc5d4000..7835456734d 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 c6ee8b59679..bd6ede58821 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 24685733a0e..ff4a207a723 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 5e676937809..6cb74bb4136 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 156b67964ab..28adeb50ac3 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 4862094a462..79679a59520 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 b82358b22fe..705e48c4551 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 bc74011de0f..e3d497e3ba5 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 34e7985b699..20fc1a8ede6 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 058521370bc..453e6cd098d 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 ac93f946a10..e576e1b0da6 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 487c2f8676e..3dc491e0895 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 c928d85290c..2cd40d36ccc 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 e38b9140143..09dd69907eb 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 dec710d0157..d8d10258f02 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 62e3a52ab27..1f6ea069321 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 db39de573e4..a87c5440124 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 6c641b9a197..6ba39a996d3 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 a11ee196749..098944cff55 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 2707a774c1f..e3a8addce43 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 37d27b60369..b271b84e2f9 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 9b6afe36735..362aa9063e8 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 e1210da03b8..19bda67e073 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 eee1a358bbd..f25efb91f43 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 16fdc9e43f8..e3ce56ce631 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 1e5e40a1aa0..48582eb3539 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 369bd37d37f..da55055e727 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 07825ed06b4..77b94ba2d24 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 f328b6c815a..99a142ea76b 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 d4aa53c03fd..882bf3e5ee2 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 ad27d3ad3e2..64dac54dfaf 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 22886c7bde1..90f8455f755 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 c7ec0e7df77..341cfb34f43 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 983f9a04e58..b29a76f8003 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 c81df93eea8..f98b4396b44 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 06356e1d25d..4dece390ac2 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 41d8ab8d5d5..29203ad70b8 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 a6cc0f7cf55..09fc14acf11 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 5b0adee1437..f6f7a9c5feb 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 12e09d5e2a0..d4930fea75f 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 641070956d1..0d67979bcec 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 0d40d404564..45c3ed173cf 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 5745bcb6b38..d53ae70772a 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 63a516578b5..d49328faace 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 ff7c33b92c8..a5120f74715 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 53a9b22f03d..013f2025369 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 1560474e41f..22d40af5a8c 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 f482b096566..d9e1ca816d5 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 ab23633ab09..99b8c1662f5 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 ba5d7fd6e1b..35474851a63 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 4ecfb4366bb..72260deecb9 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 37252143c51..db882026d5a 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 1a0755ee18f..4756fb5f426 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 b3066d3d19d..46bb82d637b 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 a692239b7a6..bffc94744c0 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 baaf7160718..9345c0b8a5d 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 a1a9a1b1006..0444c26db0e 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 02a6f4a53b7..e6658d4867b 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 5d6e9003852..3736b7cd7d2 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 1d14de0360d..22814c2096d 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 63af24ea38d..bf38d1e95e3 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 fae8de92ee9..06ed706a2b7 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 da3cec4596b..d12ee1d153c 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 deed75209ce..1adf22a5064 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 b849fb9e4d9..5713b7df86a 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 99ab7c9f6d7..c9e28cf3688 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 90963436dad..336c685e271 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 1d445bc8c58..c1ce9cbdc9c 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 ab1beb44790..3b4041d145b 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 9c80fe03ee9..9b4e614a483 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 5f7420b2eda..e3b3a988585 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 84963a2c1b3..abd0778e606 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 8814dce6ae8..4d6c9c53ef5 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 a0c2f31c528..caaba4e98d4 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 05bfba60b2f..ec1624cff32 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 889d22e0dde..a301f696064 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 544ccd42f13..7c95dfffc6d 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 6e6377d1056..832ad656b4f 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 bb616a6eba6..91982eb963b 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 6e153f703f4..fb75e42404c 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 ef71c761a2e..dc5a90a7f8b 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 97d42c2ddd8..1c58a5c3c6f 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 a6f4ffa0770..db96a5ec08f 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 dd146546125..2018c93b5eb 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 22d620f4723..ac7153facae 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 985d88b9224..d6f97fab23f 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 e90ffd45973..454f189e902 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 ad97beef90c..44f7efe0304 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 25b434fced5..4967dcbb863 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 c589af00ae4..86e93e01519 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 5eb7fe1a5d9..653ac580b00 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 9ef05efb714..afc5f4d312a 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 9b55a9d711c..710d5f153a6 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 dac12d1d752..a685d8e8671 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 249021e8608..874b70b0375 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 5c40d2e0690..9123740aea3 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 0461be192b8..b65e2c1faaf 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 016f41a4e50..894c5d9206f 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 6238968da10..be1b6c22af9 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 e67a906f707..9183778aa1d 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 000ef26ca99..068864327a8 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 e6018e81773..b0b2402072c 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 bb991205089..198b83bf410 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 bf215ec2a3a..e9780c736ac 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 a0ad4f22086..a85d3722e68 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 9f791227e71..9f03d82e114 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 8d6d4339548..57894b87047 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 e014e9a7f23..7be829421db 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 a14270d8c95..d8d9d005d6e 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 bd23100f1f9..ec65e3edb3f 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 dad32a90612..60bea35ec90 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 707db10c2d4..f598a66a88c 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 49a801e77d9..a0d3a08495d 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 b69db6f0dd1..d7302f309ed 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 c8b41866eb9..8a93681c00c 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 927eb92734c..3f2c4ff2144 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 5b6cb514da1..862ea027d27 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 c7278bb947d..2cf6a2ff74a 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 d16724ad313..85718e50c87 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 45fea207069..3c3ec247044 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 57066bc9803..3c53f673add 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 983f9a04e58..b29a76f8003 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 2bd4a5b8e3b..f954e323d8c 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 588626adc9a..977d3ef6233 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 d82dc01f54b..2e4baabedbc 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 6791ef955aa..c5706a27ca3 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 84c35dfa2a3..e6d6d86d02c 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 04326f0802c..a2ebd1b91f0 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 e760cb567bf..36d1d465bce 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 4ec92a3d757..ae6a1ab2d8a 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 d95d63d916e..dc177bc28e5 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 559090a1dec..59ff89e603f 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 a2c64f51494..05e95d0cb12 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 5e3cf3c33c9..6f4a9cec475 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 4eead7f875c..8816500541e 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 bb80218d799..eaca4cb3349 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 d5f75ee3444..b25b4ec8783 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 1aae6a91aa5..d5af3ccb3ad 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 43df02ece1b..7c18eb24141 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 ef865d826ac..0523e22a53a 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 c4d741664aa..6e341646ab7 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 983f9a04e58..b29a76f8003 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 94e329b65a1..f20a8a76ee0 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 b61a899f619..387cf052188 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 099125064b8..138c098bbbf 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 b7516dc0d13..3f5866a903d 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 c8b66f0d65e..ca3ea62dd7c 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 8ca0d2b1a88..8871965db0d 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 35a853e61c1..7fe9846275a 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 6cd676ba064..7259483f9b8 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 dcd36084379..ae06032a559 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 e9bdb89f26d..20900abc1a7 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 08ca315c4ef..407ef692f54 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 8c321a38bc5..c9c7226fe44 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 185120bea0f..4f3b7edfd7d 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 0f55127dd11..eb4fe056c51 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 25b99656751..b452121f45b 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 a6c0eed7630..47382823127 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 9bf701a188c..63fdb87e5f6 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 f8f1eecf70c..ccb89e25469 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 9301c0688ce..13cbf9ae54e 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 a53b249dafe..469ef18aa5b 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 3a44f274f45..5ec44b169f4 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 7aacb69b4e4..9b6c8aeb758 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 199c1b0e5d6..c659fbab34f 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 e9151373b64..3dcbdcf089a 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 e9bdb89f26d..20900abc1a7 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 6c68d6b1da3..739c1aa8335 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 8c321a38bc5..c9c7226fe44 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 4f3e6683a5a..b0d89d3bd89 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 0a129ebed33..658979babc5 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 070575bab23..d1006302522 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 ce934b10c88..eeedcc82c29 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 872c16df76a..c5fead2c6b0 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 2ce3abc08b1..f348eee9808 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 e296fc3ed67..6256bda7889 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 037a8eababd..ebbcae762df 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 490a577182b..9b6457857bb 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 5ce55d9362c..8e286037a4a 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 b178f00dc04..b744218e4e0 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 86d6a4323c6..411dc164457 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 f305caf8d96..e453dbd6557 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 f2ad562a40d..f29862d810c 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 34d686c02a7..d41c1fb62c8 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 e25a3e9ae34..246b1edaf59 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 9d1d3b3a5a0..f19831c65ae 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 cac2b9a6cf2..524ad9ed34e 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 2bb9f2ddead..5e17f682d5e 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 26ed5db61cc..4b41826af0a 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 29038b12f80..12e04c1e1fe 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 8200590fbf0..9ec202220cb 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 7df05b2bf4b..ab0b076a2b3 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 a277480c6df..6f82cc5ca40 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 635aef4a896..b130baee1e7 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 7adfc62bea4..6b1be34c6bf 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 98c31328a3c..4d1bad82a73 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 f00547043e3..07053d270c4 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 3c74e0581cd..424cad1b419 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 8830ce4f322..b32a636cf9b 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 f5535124024..d5429c6a79c 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 f210aeb4d66..c096edfcf3c 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 384b8ed0c0a..876dc7c06b2 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 ab052efe1ce..b53df148fa6 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 53f8333394a..7bdcb0af6cf 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 b4d6b4bbd99..5914516157a 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 8eb0208ffe4..7950955728e 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 e8dbe83ed32..394a9a9123d 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 55f0d564b79..9f64805eb85 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 d9de07e4faf..927a91530f9 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 2de71662f45..06be7f6a86f 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 fbe123aacb5..1a68a6261d5 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 9a0436e7caf..2b89dd67c03 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 83ad0055951..73ee356f572 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 af2f965b02c..f4123cd9cc3 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 043d299b8c0..c2e44b0dfc1 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 bc55ed515f4..6fe891bbae0 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 a7ae8286e01..6e549929310 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 04a2baf1d8b..f086a5d702a 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 23adbe475c1..0037858809b 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 83a0f5eaf26..142cabaff14 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 0e8742520e2..4f533b05d07 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 00b3e659a1b..3637c684ba0 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 38e4bb03956..cb08013f89f 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 b73384f3e2d..e1e5e1dc225 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 e9de4994888..807b156a696 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 1ad4b0d3175..806e501aa6f 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 c6ee8b59679..bd6ede58821 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 f644b79c86a..d4091c57f64 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 1f7f885c911..589ff5f2701 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 70798d13717..cc1bd33cb93 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 27693751f76..31e0debdb96 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 7a8e4464af9..a7f3c7eaae3 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 6ea006daf35..dbfc9ef6593 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 4a05248cd5d..ae65cfe19ff 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 8583d41a37b..364a96a858e 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 5e96de7148e..7f93d143e01 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 487c2f8676e..3dc491e0895 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 d68e5da77cc..b339d07221f 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 b42ddfd73b7..059bd33c7cb 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 e6452ba69aa..dddd42160a6 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 e010d527978..6b78427c8d1 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 5284ed58caa..af1244d8007 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 eaa314685ee..5263d8af63c 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 2df5661de91..497e8570362 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 3e0250597f4..aa534d38cdf 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 7e447acd8dd..c9056d3c3cb 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 36579748bb1..da5f62f7534 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 830196b05af..8efa2f34106 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 35dc9d3428e..ef123596490 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 1cd3d9029b2..9294b24de57 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 b43d5a7d769..69c62403e61 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 4ec491e0c35..08903f5191a 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 1dd7157250e..88ac0be9346 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 6487cf17587..cb6e6195cfa 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 fb6602acb9e..36a6c5de58d 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 ad27d3ad3e2..64dac54dfaf 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 f8bd85bba81..b4fded44e90 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 410cc08e408..15a7d455016 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 983f9a04e58..b29a76f8003 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 88428b7edc0..a5e1ed4034d 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 88a98857d99..aa1b1dabda9 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 8b5849971a2..f8daa4631c2 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 ef249affd9d..892fdee3984 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 1890d9ba833..c22227acf18 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 3f77014c819..f90f1fc7add 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 075103191ee..02bce9988b9 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 a812ce2c699..d2b1f2584f9 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 98cf0fb3591..56ff470c455 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 7045562597a..d9c0ff9500d 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 51175898152..781bccf6d71 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 ed356ca0ab3..427206f4a9c 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 548a204b04d..f058b78b76c 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 4f76636892c..f5b81e0c5eb 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 d077eb0aca7..b077718a22c 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 cc91e57322b..3f3be4cf920 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 68e1add29e9..809e5052bd5 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 8434e73e3f5..fea9868a7bd 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 b1ddabbc6e9..4ba62b2f789 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 57aea148623..794bb8e595e 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 7d51138852c..5bf50322d27 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 c3e038985f4..661d02fd42a 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 7ab0b7f9400..e48fcc6888c 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 50af1bb0a9f..f882fdd0788 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 7287446e433..2e5dbde48e2 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 43137b8adc0..d87b7d5d3d0 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 59776833f54..60bf76bfd5b 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 fa79c1f1d87..e2ca94c7027 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 c66e9bdbc8e..6a412c95f77 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 b1b45eb08d3..8b2551c6275 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 103f3da50aa..fd439521385 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 0aa1b3a9b5f..a148f1a2859 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 931db1c1693..3a24af99b0d 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 0617e4ffaf9..7154c8c6b2f 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 a6ec77f0c24..f8d13296419 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 e121da35d66..02d9a1b1755 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 81799268ea6..60d3cf17104 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 487eef4bc1f..84a532930b2 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 faef3c05135..f33761f1025 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 e92d29c5b11..d254d0f1cef 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 681132e801d..4d0cbeef04f 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 532ee5babc6..de099502648 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 c83c0fb9e37..ae41214e38d 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 8626fd86224..76d6adca3ae 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 0d39a011518..3f8b77931d7 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 a5f966b4e00..e45fe417308 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 cca11ce3bd4..e496d1bc2e9 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 84963a2c1b3..abd0778e606 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 369334bfb5f..06e0176f43b 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 839c667653a..d3da1a51dca 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 1b8fdc87bd7..d130dd46819 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 cde376ddc5a..d4cd12b99eb 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 cf5d267facf..f43c184bf04 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 2d1f43a63e4..884fc532b5d 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 0f231cc177f..42afbdd6cdc 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 01231cc0c83..ec8faec1ec4 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 b9f7ca2831c..cc7170691ce 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 b3c3f1250e5..158a0efbfa2 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 5e66e34484f..180c249cc3f 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 409826a8b1d..7cf926393ed 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 8f65496f22d..05546eee1e4 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 9afad978eb9..98828aaac45 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 45e2cd38560..8322e075816 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 73df462c9de..34d39cb184b 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 91edb20c64b..616024f6290 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 61c284d7970..01fd7d09d07 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 0c5f61dd9c8..eebb3c14314 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 11088a51c30..66d8b534994 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 1836fafb470..a3f4ca6e6a3 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 8a8169d525f..0df694c2aed 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 fe89e84efe4..d0e8b6a7168 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 909ac274403..dc237fbd67d 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 afb3579da32..fb2856eaa74 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 690ec44f092..48574107cec 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 c1aeb909c1e..b345bad24c4 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 8306480a6b5..b3ad94874cf 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 bf3e04d6f6b..ab5509ca7aa 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 57e3971bc0a..74e59fd044c 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 e39d5f671a1..2bb5c3b18a3 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 b29f1f0858f..a0c7db28e0d 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 29b8554c3a3..88c24cd6309 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 c01020ca289..a3a28a8de6b 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 b92f8a26543..aa6ce19393d 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 96a088bf1d9..8e7ae5e81fa 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 f9eaa1a6def..cdcf03b6409 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 3518fca02cc..5319895a92d 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 ff360f9f3f7..a6f526f79ad 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 f6eb5145856..22dd7a30d1e 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 6dbf31d3f3d..c6f9123cdf2 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 0213bbf93eb..5ed08748cdb 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 b147918b653..fed02ca0d3c 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 47ddc37e408..80db3961f7b 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 d8b81c0e7e3..e0850ab168e 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 c05b8f61971..0f6665e55ee 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 bdcc264669a..5e8bd5760fe 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 4f18f05c0df..a6096ebf404 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 65c22045562..d9b99c8349a 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 983f9a04e58..b29a76f8003 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 98fe38deb51..71c857672fe 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 9258bf18fd9..719e723e3d4 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 e12a8b8aa6f..485eaab616c 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 66b5db62db4..992cd634867 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 58106cf78de..f4f6203fefe 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 dabd91194fc..2366fca32ee 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 204e60098dc..cbfaf412f36 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 eb89b58b18f..c1b0c583ebe 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 242bbb691f4..66089f077f9 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 559090a1dec..59ff89e603f 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 a1b613ab540..4787ba81fb7 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 8acf4d3e1a4..a1ac3d5d5b6 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 33a13af789d..ece83dbf543 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 fd5824e5811..0d2cbfe89c2 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 7de1f4f0ff2..ca6c6737b10 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 1aae6a91aa5..d5af3ccb3ad 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 fd5f5c5d1e2..a06740ff5da 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 7529e5d4288..9aad37d8698 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 4b1348b8efa..4c232c58679 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 983f9a04e58..b29a76f8003 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 51c11d76cad..b61b612fa1c 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 252f435ffe7..f69f89e37b0 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 85f487da56f..d1998699a97 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 015f734790b..7fed7ad9ccc 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 abbf09b1c26..716c6004c74 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 0a3a5fda96a..3668f2168df 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 840f8b067ba..f141690e68f 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 ccb90fa3d33..ec421cc7612 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 fdbdf19623e..ab339511f51 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 624a280ea46..f5373e78223 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 e9f1cd76025..12a8eb1c03b 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 5e4641014db..c58e4270a60 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 18afa5a8598..4ca9b4441f4 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 0771cd0f375..b45db3cbd80 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 facbe33f884..4ba3ea340b5 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 8886a4fe39b..5839405adb5 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 4cd7b0eae9b..79b9b6f3968 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 d88729d1f3f..86a6594caf1 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 24c0b2a276d..a38a8638645 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 6a56ae24e1c..7eb1097a722 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 00d21ba7a91..feebfe59760 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 16bd03a9360..9ef09cfdcd3 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 4d6e4a88a8b..4f1f874c66f 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 2320bd185c3..991f0e5722c 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 5584bbf16d6..d267b003f70 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 acb0b432082..863db9c3df8 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 e8a5f6f4c17..cd5573074c2 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 3b0aeed383f..9d2a313b832 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 d349aaa4cdd..7e711dcc7ea 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 4a55f164403..5f168fe47b1 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 8c321a38bc5..c9c7226fe44 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 8167b9d2446..a1b6bb415f6 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 a0189a8d750..9d0649e4b0b 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 dd03c163998..308e3a52f02 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 a9f087e5af1..85a4cc95736 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 3e494a7669d..a1016ec591c 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 a6c0eed7630..47382823127 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 aefe3663988..484526dcd01 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 61ca248d09f..bf971511e8b 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 487c2f8676e..3dc491e0895 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 5b5be0d804f..387bc0c4330 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 72028dfc3c6..1755c8a1d01 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 3ad5773b02c..3ce30305b81 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 c9d16ed9a8c..71f1d6ebe3c 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 62b27fce53c..f3d611c2404 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 09fbd8e8b42..db07dd48bf2 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 46b7b8f120a..be041d19e45 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 8fc8eb3969d..fbe77e5d7cc 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 a2c7ac28d84..4c5e65a7ee3 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 31b4ae47c58..711a7531e81 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 b499f57cfbc..672d8dfc0db 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 4f69bfafda6..4d45817a116 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 a95d0d1805a..500398e7a45 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 6dbbc94a92f..56747b5e2d3 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 0146ffb83ee..826ed4318fb 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 8bdf4b6ff82..4f724f71f1a 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 516e7fa1d4a..0234650b2d1 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 666f9dedd06..2277962568e 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 3b0aeed383f..9d2a313b832 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 2915ef8e37f..805f4292355 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 6cb27215831..5778a6eeaf3 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 8c321a38bc5..c9c7226fe44 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 4e05bc41ec6..26ff9004d52 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 412bfa9d3ea..668f66eb890 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 3d7f8e5c828..2ca02a526ef 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 a9f087e5af1..85a4cc95736 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 8c094235dfc..9ba28ea657e 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 69a11c033b3..55efbc3b3bf 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 cccb7f7ec63..f4ac507eda4 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 60d2621cb31..445162ad583 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 1c8b8a6707b..de46b599532 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 0a3bc8ce682..66668243766 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 30be934327f..77111b336a0 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 1cabd2cf5ee..78a2132c2f0 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 535873ca581..f89141fda07 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 588fc3fb297..6a50cb30207 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 e513c43a595..933c36bbdd5 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 e69742b1834..a9202f51121 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 f89ecbf1e64..f2247ecb0d9 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 9b7f2810878..9849e055f5a 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 d2ce4af252b..640647f9849 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 5c1c5fb2699..f07707951d9 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 ee1dde6be8b..744f71c330d 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 d770e51f7b3..c8fbbf4da90 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 3ea6bb917f5..e6d84654328 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 6428e9f381b..88536c4e052 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 a136e1fd7ba..9e3477efc81 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 faee6bb2a54..9d48b0cd448 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 6d7c7f4fefd..b695fbeed05 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 d446796f6e5..473e7d51f5e 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 42f96c14dc2..3357d9b3ce2 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 c678fb42e86..edbe5fefa55 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 8998a220939..f088aaa4a22 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 94ce272fe48..d6240277ae6 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 42efadd232e..96c884b227f 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 a1f2ba60f4e..d67ad6d40ad 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 cb10a91a15b..a85f9292f2c 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 4c1171a07bc..07b66173a0d 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 956a53c6743..81749f4dce5 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 b3d87ae640f..b03696d55e2 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 acd2459695f..e4f619e88f1 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 0c7ca9958c5..c18ab95536c 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 bc00dd1ffb9..7def284251b 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 194566c8dd8..9ad0e1b2610 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 8349035e093..ba45722ed5d 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 2fa609ae2b3..6b9fabe0f02 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 9f226bb746d..b75d1784358 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 22dc7cd90c4..38abe439252 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 c5b6cce44f7..e5cd5eb5346 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 9157a4599fa..7ce1f107638 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 19af4d92cac..59a0b5fe8fd 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 f8b0c6f2fbe..17761257da5 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 0c72f22ef2c..39e43e49f8d 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 f7d4de2bec1..ff6bedf7f13 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 da5ecf2212a..daac99a4858 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 0207353fa12..69efbd31fac 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 3c9724ceb3e..e9bf0bf957e 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 23d1653ecce..4bcf3d7ccbf 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 ad4df38b628..3e5d7955157 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 c6ee8b59679..bd6ede58821 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 581fd7b73e2..fe4dcdc47e1 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 1eaba8a0e31..e6b7ef04919 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 3c78ec33bb3..45bfbd371de 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 68e5cf54591..3051e0adf09 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 d241dd98d72..71df4ff7521 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 5959a120510..39e99c27ebe 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 9d9dde2246e..bfaf09ddc9b 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 094244fbcb8..80691239849 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 ddd75364089..a72d9651506 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 487c2f8676e..3dc491e0895 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 e032229b294..893483a02d6 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 7f99e0e2ef0..d941ad38935 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 2dffd5f59fd..95606545aaa 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 10cd822bdb0..4f3b0a0fa93 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 ffa1e5b9f5b..248de806d1d 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 04259572c35..9c6d685362b 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 8710c9e2e6b..6a5b4839acb 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 415a0989c15..73dc7da3d4f 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 09fe04d11b9..7fee07d5c8a 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 15cfffdf36d..431b1107192 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 4fbd959cf41..78b2945fbd6 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 06d3ec5d8d9..4bfdc4e3a47 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 a5941886449..ff96184eb99 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 817f7e491ff..56dcebd16d5 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 b1c0f7f87d3..ed00e68c28e 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 20c53e56bd5..959e4dd1b46 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 476be0b801e..34b630737fb 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 f7335b8adb2..3e5fe25994a 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 ad27d3ad3e2..64dac54dfaf 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 cf3f6ae10df..809a6bd4ed6 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 302aec3d03b..ba759d62532 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 983f9a04e58..b29a76f8003 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 bec44d655a5..fca751dcdf4 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 ff304f1df28..05fd2221509 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 ec11b86b846..b94e5873ae2 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 02a3e18a893..f461b7352a1 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 803f0ab6440..a6b786bc8c9 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 073e80ae08b..9d0afca01ff 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 d9488439074..ca38ff780fb 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 b64253abf9a..1bcf9554149 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 d8d1c092388..dcd7812dba1 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 cff41466517..c5140ef758d 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 5425d65d942..ba79701ffe5 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 2d8af9699e6..d3ae4a3c898 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 10386997d3a..ea3593684ac 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 dc48879d6be..ec56080f713 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 0786e642448..974aec8d287 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 3bb11c7d442..639789d2a9d 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 cfada839f0a..ab26943d0f6 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 b2bbcbc1d99..3d3a8f69d0d 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 e152101cdfe..ddb096abde9 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 4edfd2b9164..9bb71fce759 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 354d2eb549b..18ef9aba312 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 604b2db8ce8..848af07c3d1 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 7690c5ed275..ea3748574d0 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 10157a4e50a..e7af974fbb0 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 efbae529763..7daa0b0ef83 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 6f144a3a879..fb6974490b3 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 855250ee55f..a8c407bbc41 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 fe7cc64fc6d..ea14ddec991 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 7c92ead162d..dafe230ff35 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 150c91b51a0..d758d13877a 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 37fdb12aaa6..83f3dd41471 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 6dcd7404865..e19335cd7f1 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 718b1ac635f..2fc92bdef78 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 5794ca9709a..02458affaff 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 12545b45288..88b98ee9b35 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 9fde47c2f17..0b32d0d7383 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 01d6ce5ffa3..f4ca206d502 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 addb7620fae..dd61acbf609 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 84963a2c1b3..abd0778e606 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 0aa1d9d11a2..916ecce89f9 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 53ae187d70f..9fbec688581 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 55727f73559..57dcc90976d 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 0a2c3842632..cb237626bcc 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 b727d3f1f39..1bb25daf908 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 3a2cd2ce284..f3cf0bbccbe 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 fb590c6f2eb..b3b33b82804 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 ef3b89f826d..4ff1dd4b901 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 34806203d43..85fd35dae3d 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 37bf0c0334a..68ba8684b27 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 31206068114..5f3c6ea5bae 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 11088bdcd54..344322f87cb 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 9adec39c764..cddb6eb9fa8 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 2b53cb3a25e..718a9b5d66b 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 5bf26e83deb..a5e7823736b 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 e134598888a..5feef39bb56 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 b23e3d3e724..6b46475da1f 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 94f9a3c3f0e..6fa0cf37f33 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 c5f9c5b0fdf..343d1665e7d 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 b9f7eb01d91..49b69419de9 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 c0aff472a1f..11a2f6fa7eb 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 32d32209d75..17640ee65e5 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 5e94d1d3f24..f20381ef67e 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 1577d1e030a..6573902bedd 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 22d5e344055..76752348bfd 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 ab4f7d27d42..171305525c6 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 297cf672b10..a13fa39585a 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 c0eb345e752..bf00930ec93 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 1d7517df0ea..d3160ad83d3 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 524de877be5..29abd7fd74a 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 abe82a47eeb..84ce9ca3f80 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 2300f93b011..ca89dc9023c 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 217cf583257..1043d5384c4 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 87dad9ddee9..5fb9ce3f975 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 6db266133ee..5ce874a3301 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 974c6f228d0..63f063dee77 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 60995c3f601..2f626fb8b88 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 c00d01965c8..f5db7d54fbd 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 0ee181df15e..7dd27173c99 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 d31ef9fdbb7..4a9d9dbd7cd 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 405019d1db8..3d9e8eaea6d 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 500bb0f522a..9f1cc4ee59f 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 3a0ac3b6e09..bfcd1ce2d65 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 a7530c52dad..52af3371038 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 6493a71d06a..d7ca76650f8 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 1b750e94680..ad2007d4986 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 bd3110cf99d..f8d6e336cd9 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 e969a6e3ba1..135cb299a98 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 70992277f91..2a584f7a9c9 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 983f9a04e58..b29a76f8003 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 c677d8a5393..c542f9d4f5a 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 155839c3942..0278d7c1a47 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 f40a1b27735..bb9afeb19f4 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 4c47115a6f3..5f554360d30 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 c94da2248ed..15c027eda1a 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 a974cbb10b9..6b0885aab19 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 8afd7126fdc..8b9f60b6b6d 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 e6ad75a02f8..28be8bad3f2 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 cc8b325ba2a..ac57b721c96 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 559090a1dec..59ff89e603f 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 49dd25a0f86..a0bb27a1cbe 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 1917d88d123..02cda5c6362 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 a564a55869a..0dac806076e 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 371aedaa3bd..793efa51358 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 124bf5f2ae9..550a6cc56e3 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 1aae6a91aa5..d5af3ccb3ad 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 7dad7ac5c88..37476a20351 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 37aaead6ebd..28016d5b22a 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 f80e1772c29..9ced83df37f 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 983f9a04e58..b29a76f8003 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 11527bab7fa..39a2f418671 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 9590b503667..9ff1a51042a 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 f4fc804856c..8207efcdd3b 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 0773bf3ad2d..2e4ef403d3c 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 d025733a835..f7ba06e79ea 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 9e22f04ad28..090a826c8be 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 0c4ed9eaf12..e616c829b4c 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 510666fe5b5..685d28b5bdd 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 93bbbbc64bc..620a533ff4b 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 facbe33f884..4ba3ea340b5 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 237ee20b745..2bb9bfc2cf2 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 8a9802003df..295289215e3 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 5fa90ee7f72..779ae2003de 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 a771e0afaca..881c2c7cc7f 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 4378230cf45..43f612a46b7 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 d918523795e..32d398a6455 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 ec19924e32c..12ab835567f 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 b6d24bcc9ac..237d7e58739 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 7ce2f332cff..49f9c042698 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 ca4fb9f077f..d8c886c924f 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 c23ec49913c..1be6fd51411 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 5d95c6addce..002a4beaf89 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 3b0aeed383f..9d2a313b832 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 5dea20dde14..520c79642f9 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 8fd5b5e964c..0c49c96b523 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 8c321a38bc5..c9c7226fe44 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 a9bf020057e..443b6b3f9b8 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 92ab430857f..4bc18c929dc 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 ea17e71581e..7e0f569712b 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 a9f087e5af1..85a4cc95736 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 ff8a6ad2a63..d61bd1c8666 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 a6c0eed7630..47382823127 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 eb57ec92799..a3b79c73df2 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 af7bd228534..62eeda09f74 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 d87c37ff7aa..35d589957bd 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 dcbf751a62c..b04f0b37f07 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 77cc7e7ee72..25778548bbf 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 bd2fe4ffb34..3684a967ba4 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 92e0eafd0c7..ae5c19c5f0b 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 ee455937da9..f07533e18eb 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 ba2dcde9fea..6b5b40a07fa 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 bce0696560d..c5c50096ef3 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 65266bbaf3c..c685f318668 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 8c733f88fe6..e4cdda5ba9a 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 758cf70e36c..8199511227a 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 31e017d9200..516391b4be4 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 30f16a76c0b..cf0c3e4c670 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 3b0aeed383f..9d2a313b832 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 ccdb46067b0..77d09165383 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 cffe3868e64..d2f533b4d26 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 8c321a38bc5..c9c7226fe44 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 bd11226a27b..b1860188a49 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 b358ec3a63f..8a07a68a12b 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 0472b666296..1dcd8449331 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 a9f087e5af1..85a4cc95736 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 b0a96db5102..245724337be 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 4dc55c20dd6..f9c038ac508 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 e1f3d15c176..fbf9d916982 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 b73157a5e46..5262bb6f749 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 0f78b1b1e8c..84ffb9eef86 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 e3926c00c42..d5e92ab47db 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 609059e8cdc..99d03cc936b 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 a89a1501954..c31ba2e1e79 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 4c3abd843a3..edd3dc31c00 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 857c15a1812..d3c5073f166 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 0c663a14e21..8384b6de0a2 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 c69f0afd6a9..f740d257033 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 377f0eaccca..e1475d49c6d 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 af772a16e02..ab587f3323d 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 93e0099ed63..31286dd3ca1 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 8961c104a75..c0223285942 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 7cddc086814..35c87184cf2 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 7fb8e0fc0b0..e01355ca477 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 4f01887bc48..361b1b8db21 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 ff13a3a5dfa..64c0b6f145e 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 23e1c4365ad..c145816c82c 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 368453d2493..597ac4fc835 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 acb3420da3f..24763013ce2 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 35a094d3c35..707c4e4ea51 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 e6e50f05b13..c2a97bc2379 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 4ac259e2985..5c839d71ee2 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 6fa3369025e..8388375e929 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 69af95441ca..ed35f1bebc5 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 1959bb548ae..c9f59aa434d 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 d0242190f16..91bb7554e25 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 2e9beb640d5..9ec05c7e615 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 75b3f6ca83e..12c98e120eb 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 4d4dec1ba00..b4325756251 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 edf6152eeba..3d5c9a0c98a 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 4a4a25f1022..58d657263e4 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 87215f1e396..f9f04620861 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 f9161861a40..38a5dacd87e 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 a5291304302..cf87aae68e9 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 d75ef86441d..4e05dc73809 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 101865d8e45..2354c57e9a0 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 3ea78a2a412..9f5ba42e979 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 3a190a31ba6..aceeaac7248 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 4af940dae90..b23c074ebb3 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 2ce9eacdffe..460a50448c2 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 505facac7cd..a28ed6ea605 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 441d2c7b845..4377de32829 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 acc3461579f..cbd631ad620 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 3d601797ca2..55143a9d7a6 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 6d231af560c..df222ffe4a5 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 792e7730771..919b7f89f2d 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 c6ee8b59679..bd6ede58821 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 c816e1bbdce..808a3fde5e1 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 d78a97a65a3..1e23a811de9 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 d829b8e005d..5553c0e7267 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 b39d86edb60..7b58c36ee2f 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 5615f4299d2..f8262f8857a 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 0555f319ad3..6591ecbc510 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 1e45cbc4882..c3d0fccbb9c 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 a933008bfd3..2e72bd29069 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 1f25c113d6c..90e53f41098 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 487c2f8676e..3dc491e0895 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 de5895dfa77..2742ba49657 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 a8b8649edeb..ef0dd6d6f39 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 c38bffb5514..dd58ce43a43 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 abdcd983bc5..afe01e9ffb5 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 54283c721f2..13ec697ba8b 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 c7726cf6128..60824c4ef1b 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 292189be9f6..413447967a2 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 986d7e6af2a..48a44fca1dc 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 e350b7832a2..2135329a99c 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 560d9da4025..46f67ac30c6 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 978488a4719..1145281dac6 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 8a5d3c08a34..d37ebdf17c4 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 c07a37534b7..a16350e0903 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 0648f02539f..b139737e52b 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 783754f12e7..8b3e56bd23c 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 29427014988..9cf89b327e4 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 016c16ebcdd..328224ac34c 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 b26c4910872..b78adee3ee5 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 ad27d3ad3e2..64dac54dfaf 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 824eae5c3a3..6a6fd79307c 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 158418b5400..6ef4f08be77 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 983f9a04e58..b29a76f8003 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 248a6fe93cb..369ea2ea21d 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 7de5f0d3d03..17e0a58797b 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 42faaf7b5e9..bbb09cbcf60 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 fd5f34688cc..36d17153ff2 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 ef8f19c0ec4..9a75a7e8d78 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 06276d843e2..be7510fc06d 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 b4da3c7b4ea..a46ce6a8b6a 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 833670afbe7..5efd29c5058 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 5ebd3526ba3..a92523e6bd3 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 7045562597a..d9c0ff9500d 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 80bb93c76da..66fcb0cad64 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 3eeac2b69b6..022be46bc1a 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 608f717d51f..6dabc9eaef0 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 d6a30b773e6..6868147e1cc 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 1a2d2b2e816..f7d29f56a87 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 99d35fb842a..8db46094793 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 901c20ec9ce..1cda431284c 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 8434e73e3f5..fea9868a7bd 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 03f5a3bd3e0..33bcae300b1 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 f860dbd62b2..803f83f95cf 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 da1b87b65d2..bdaa643cfac 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 b98f7fee0ef..6bbdcc72427 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 71e550817ee..259052c73ab 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 04dd676a545..a25b11cc4b6 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 563c1684ecd..0c99bc20cfc 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 32dab28d9e0..962275e45d7 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 20ac6969357..bf6827c3dcb 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 f22d9a18d69..7874d2d2d1e 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 39b75606ac1..95000cdf172 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 c1f09c60d45..33723626b3e 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 1d2e5dccad1..342957af1c5 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 122adba5f92..ff40b15cb19 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 772a824d574..578e26be7bf 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 30d6f881c7e..8c8105a3691 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 7281ca07f94..0a96ffb8cec 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 f5517b39063..8868a27e533 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 35d280ff2ad..106640c984d 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 68444e55d52..9d2852a5027 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 551e243250f..3d985917c80 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 048b0849474..fe4bf78280b 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 f0541aefc82..112db8d1a5f 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 0aaae965f11..c823ea5f2e1 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 a3fea8401ee..489f6b42a49 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 3ca231c608e..1f4630c0dd2 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 9ed78205d1d..5e6ac171225 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 4f599db26f6..72fcf7cc147 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 094f0fea2d9..2cbdcbaf616 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 84963a2c1b3..abd0778e606 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 ab36a8044b8..32bd944d612 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 c632d9f239a..b9198bd5cf6 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 d9dc13fa683..335d932f254 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 49db1612ea6..6e4342bc3c7 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 db5fd9e2dc9..c21a7ba60f3 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 5fbf64a51be..6c6e9054c7a 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 0574dc243d3..e3fd3b809bf 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 8dcc4e35e7e..651bac51a0f 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 7bdc5373e4e..e5276fd3e67 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 175fc2b2505..920d874f752 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 fc84f94c075..78360a70d77 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 a1686cdc4d6..e964ceca7d4 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 7acae473169..67f5f349a99 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 81fffcc428a..f9ff14a469d 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 6863443ac77..dfd0a528491 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 19d00ff7148..4395deeaa69 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 b8cf6f75905..829c6c886b7 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 a32b9875c7e..645136ee400 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 6442b0b563f..d4b00e28b6a 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 71ff988c682..3b8b02eaddb 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 297687f4fe0..938656bfc39 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 b1eab89fc95..c55f8bd1ccc 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 79f0e328888..608d7dc105f 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 d3353310a5a..48e6465033d 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 657f9d04db2..9699c7cfd46 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 dffb72f1dd3..ad2780096d7 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 3c83565dd95..8b28c9592a7 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 966dd3da04d..818f6ec2089 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 8e97431ecf6..2d7811d6566 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 d8dd166e5a2..cce5c076e72 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 6104f526a72..e140879f592 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 314d1f836b4..c32c34e61e7 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 be28f50f459..a4005c5c7d5 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 60218951b93..9095835868e 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 c26cc46b770..e367fc570ea 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 558de2f8a08..930b0901f7a 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 51ee84e816d..9f786dd359a 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 7387a52b55e..05ed836af88 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 366e4a24f7c..3a858c62797 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 3b9298e8577..80f5904bb0d 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 aed71e1281f..d555586e669 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 af3835c7f1b..87bad3de738 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 9477800826c..d7b676207a5 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 a657626add8..f4ec39a9bad 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 fb624aad7a7..050341a3205 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 95aaca685b9..60c41cc8b80 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 9eedc5434d1..b7c546695a1 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 d50896ae18a..7f4ca9ee279 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 03414cf3d10..dd7e5365201 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 983f9a04e58..b29a76f8003 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 bf9df66b89d..e025fa3fe01 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 385c2836965..8df53189460 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 8dd5518fd25..a0384d23aae 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 767ef8a714c..ab1c8ec5182 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 939d1c29874..ed84be50b2a 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 3fbdc2be211..6958a11b95e 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 ceda28cf4f8..36edae70ac5 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 fdce8b89a4e..c85bd24034f 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 d4de6706c62..279d31e7683 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 559090a1dec..59ff89e603f 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 6eec1c29a91..d053be9fa61 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 b78537b59c7..b51f4a5dbc3 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 9685cb91626..5f7e64cdfd8 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 a81277026e3..1f2eff51515 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 27dec553bd3..bc0e1b6fdc5 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 1aae6a91aa5..d5af3ccb3ad 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 5b3026b702f..333002b384f 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 5473adebd6e..aefbd4fa483 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 e90872971ce..70ada699689 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 983f9a04e58..b29a76f8003 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 d435fa7382f..3f2fb00d977 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 c5423d8b56d..14e01d49b54 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 c71ba745038..f66112fe76f 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 6cf4477346f..8e0a2a485c6 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 ad1f82dc481..4cd9cd6eac6 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 ccd83bd0c78..ef0065c63e5 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 a4a82415bd6..2c70a94fecc 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 e2f26dcf131..6af493b083c 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 2a95ab9bd63..b7ca786266b 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 624a280ea46..f5373e78223 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 b3329069f79..bbbbda84028 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 da5205ea1db..50512db8e16 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 7e1b57489a2..2398768c519 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 506010667d5..3810327c32d 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 facbe33f884..4ba3ea340b5 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 59a82144e23..d6ba4f21147 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 b276e6d03b7..859587da3fb 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 60ede55a949..d80b3de45c0 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 095df53ad76..12582a848f2 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 c67e10a0329..4e0da8024d6 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 e02eaedbb1b..1108f82a70a 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 356dccd2f15..f9604f2c66d 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 7152d21e22e..3e6e9e98a74 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 bc72bd69652..eabccc0f6a8 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 beeaa71748b..58fc4027228 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 fe02330c976..7e873c7ceaa 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 24e788d2644..2829aa395b5 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 3b0aeed383f..9d2a313b832 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 e7e2222d862..c7d57b83cf9 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 85be02c2576..daf18ddbd11 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 8c321a38bc5..c9c7226fe44 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 9a5ac6e248b..642d63c1904 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 0531b2e4d56..bb66a5e65ca 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 c376b99fa5b..aaa76e3a939 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 a9f087e5af1..85a4cc95736 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 8d72cb50677..df9e52ae392 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 a6c0eed7630..47382823127 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 78252328689..72b92a24b3c 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 e6b855c4d34..4791f259d93 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 487c2f8676e..3dc491e0895 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 2d7df6248cd..ce1aa557800 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 667eedfbb0e..67471ec71de 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 1a6fba60248..968692fd9dd 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 977efaa6bf6..925d9e47503 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 50e2c52ee7a..61cdacbc8eb 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 c6d18cbf57e..a502d087670 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 b740f255ff4..1927a3d74d2 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 fbef53827a3..ae97558ca20 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 850a9f5a413..3197ed9ae20 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 195d58ff490..84c16f006da 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 7b1cbdbd9eb..92a381d8e59 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 0ab8ead8c0a..72e7d94a79a 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 e5b6cfcb7fd..22ccac50610 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 96bf8ecc924..c3437eff5d7 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 99f07ae525d..8b01473ae45 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 9ed07409c8b..a254f0c8514 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 a5c3a214797..d594b605be9 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 79b0b8e24da..884ef097c91 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 3b0aeed383f..9d2a313b832 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 85cc44ce846..63960506674 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 771b5b0ebf1..94884bb6ff3 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 8c321a38bc5..c9c7226fe44 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 e0d6c289ad3..f0ea59b9636 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 ddc2587b6ed..e47b8921516 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 1da3002a3e0..989cabd7e24 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 a9f087e5af1..85a4cc95736 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 4d115b2276a..f387c894f05 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 e99da6064dc..dbdfd03c850 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 08598a3c4b4..553dda2f3aa 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 7720b3237a4..d226163b59e 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 33bba83bef0..9479fd5195e 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 d7b80734872..4c1c28d13c3 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 2645f589950..74527bf1b91 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 2f3bfa76691..0a70071e72a 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 ba7f921065c..27d0bda4d24 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 a069a6f4d0d..580a5391030 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 f2b28ef8b2a..f071958bf19 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 d9996ad0bd4..3322f18a5a1 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 e2ed1e2b461..50f37ac4a51 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 fbdff231f48..a5b21a646a5 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 27475f88e21..93845e653df 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 a20eb428dce..e9338119d9e 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 43bdb6a3438..d48c45f748b 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 cd1cc126054..fb986bab90d 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 9639265c7fa..3f22cd722a5 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 d520e7a8a9c..a3102860f77 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 ebb48600391..225c6c50816 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 07e3a737eb9..29bc36f8d18 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 f76d9012f78..8495f8ef5f1 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 e9731d2a47e..40da895c271 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 bcd44c345ca..eb958161f2b 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 dd65c0aad86..b3d62889942 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 57248571d5d..6f4934c3e8e 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 098becd2148..f729c633f35 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 ee2c0196169..293c7f970b6 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 89b69788e4e..ba2091a0aa6 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 9b8054bb246..295de23c339 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 69bfc725f40..783d276c65f 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 d13b6bcf441..fb38e1b265a 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 1aa4b5cfc79..aca0f8cadb6 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 eb186ec00a3..bf4fa9c9aaa 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 642e75917ca..16b39fff1a0 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 4135f7c10da..04fde21c410 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 9d469229689..3f6da24f73d 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 6f279a66b05..9392a0a8ade 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 8a3d755d8d0..55d610a496c 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 295d547955d..60f46ca2e3c 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 4440d0fd946..a4294250a69 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 b200aa0f787..e228e0966de 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 47b1e2d5295..4fd1c3b2fb6 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 16248fe050b..e11f4493285 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 3a7d1740129..6fbe6f3695d 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 99ec7ea4fae..7b3199728ef 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 c7b88d3cc3d..ccb2cc91dbe 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 a43ec40b7d6..f995026c459 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 16601f34a27..018d9e974ea 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 4e3e938b827..269cbbeb1c1 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 62f94795f28..fb8aa20d2f8 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 e85ebda34f6..56b692e8d73 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 c6ee8b59679..bd6ede58821 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 47c6698b66c..93c9f9eea3e 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 cda87a56db8..6fc31e7f82c 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 73d01371775..9035b8b27a0 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 c42c0241a62..29f87b32e45 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 24d8499ddf2..9b51a456568 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 90944c386f2..7656ea103fa 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 770e212efe1..ce6b9a70869 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 aa8051ff471..5d5f903f181 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 05c3cd07cb5..3e1f734c329 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 487c2f8676e..3dc491e0895 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 d1f685030c3..0ede584c84b 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 5566b9348ff..5d224e56e56 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 7c25acf03a9..7ccc8aa0bda 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 5ca85d9e44c..db6304ad6eb 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 6c96076c99d..944b97c59d6 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 70fe67db640..07b30a24460 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 bc731a7f1b4..50844dc19e8 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 11da0813804..d0ef08b2230 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 3dde4e07ddf..55af0692b80 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 1d0dbb0fe39..943f8d7f0d5 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 95c40664a84..14522055535 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 a2dd240b315..66dbe79b13c 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 2fe944b7075..b68f07840ad 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 0c60a0efec5..6a7818fdcd8 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 cae99189143..2203b5fb9c0 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 0f31e19087c..4ff20159282 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 d2c319ecf16..abed8b90687 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 1852068705d..aa4f33ec232 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 ad27d3ad3e2..64dac54dfaf 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 ca7d2c203b5..2892fb7e64c 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 9899db85ba2..27e4d945eeb 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 983f9a04e58..b29a76f8003 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 0b0dc5f82da..17ccd33bc57 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 944fc535612..04109b638e7 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 8037a2cfc96..270b8f4e4e5 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 82e607cc1a6..6c83bcf275b 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 9d224029fd9..fd85908fe35 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 e08f8e552e9..a7fba21462f 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 47e37b4b6d8..18336952f08 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 5b4004dcd58..ed29aa1cd0c 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 e3dbdcaef32..746cd9de5d4 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 7045562597a..d9c0ff9500d 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 d5b43ba156e..d2e5edb3cc8 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 6ddc4cd88aa..3f59d394d0f 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 fe24f5e092c..df1e3f54ece 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 26e9f6a5fc1..bd42556a833 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 6597c45345a..aeba4b1ce0d 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 63607768426..32e206f65d6 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 a76cb305098..1dae115bc25 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 8434e73e3f5..fea9868a7bd 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 6f2a84f2b7c..ec163084f79 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 bb44902eccc..f3933e957f5 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 c4d56ab5afc..24ebb097cc0 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 7b5e4952791..9bbb5fd30a1 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 a66d68552f7..29f9966adcb 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 b48fb89947c..c99d997ec86 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 eb143f63a8a..73549988129 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 779be26fd38..c5b008b646c 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 7a2eb2063d4..1509b56560a 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 4256b631094..2a1c8d38211 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 ca8259e2ac5..b46cbb9d2ae 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 41df3b9842d..71c0e644d58 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 0b98a3554de..e957b874dcb 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 9cdfc652502..ba7f0690b1c 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 dbe66dd21a3..7975f11a52f 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 9ea5d497f14..9ec585d9536 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 dca4a9a6163..bfb40918476 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 6d5545776b1..c90bae97b81 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 41a94e2b11e..76d8ae945fd 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 746368c4593..5a7252e8341 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 1a49faffdd6..28e7ad505f4 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 e81d4795e57..4b68d069ee6 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 1c7f82297ee..77c56211d61 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 a6247e7157d..aa0e4d24073 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 f2b4591c92e..ad56c397862 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 3c8f448dcf9..ee82b60740a 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 9bb231531e2..ad7d26414b7 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 2760df6fc3e..794f255d105 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 5961d93f06a..cddcb251437 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 84963a2c1b3..abd0778e606 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 a5f1bcde739..93288980114 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 68bde61b93b..aa2e63f2a0f 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 a763e29ae5e..c416be94b58 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 dafac71dd04..8dfbec141a0 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 8d2587bf4ea..60511ea98a8 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 9f68b13f79a..3f6029edc4a 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 4154b57dfad..e496bafef8c 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 e533009dfe2..74491267fae 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 fad0d9ba686..bf219b75219 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 728e6cf5fc8..aec9a450ba0 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 286b21193a9..0fc7f1cecdf 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 d9bc481ab82..ed5d34456c5 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 b9bbeb43644..8a772246dff 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 add26afaa0a..670cd3b2a0a 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 a5e14a45352..7c27214f0fb 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 7a4c0c2d577..889c2a09162 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 81fdbafe74b..d77df36c664 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 f7a0a8e9f00..ff501190aa6 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 f561a2d9f0c..2735ea43625 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 47ebc27f78a..d5d5b412339 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 3a3fcbad343..f57366eaa8e 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 791e562c663..430fb827c84 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 d29d47c7723..57e3eb4de9e 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 689519f931f..15b14f783a0 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 9ea655ae504..ca6bac95c28 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 d4b11fcdaed..4e1e9b4e5f7 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 72c737165e8..6ddac3bb06b 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 6669e91a363..bcc0efe42db 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 4d39a438edd..78a6efd399b 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 b802d1e2b11..7d02bd62936 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 f8414316659..10ce945e51c 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 8e75129b7b6..64550d68a08 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 ace5153659d..a57594b1e79 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 aa7022d2289..77c33c4526f 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 bd0fb9078b7..7d75f6c7bde 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 e2660460efa..b4cb9828dd7 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 b4dc5965478..6c2a94e3b31 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 d031747d9a6..1d8bb927bbd 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 f8ca43af118..4b25afbbd85 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 7bd99e66ecc..d040e2d7fe5 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 e544abbc319..1e47c9cffe6 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 fdb41ac3157..328bde7f929 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 9dd85a86c44..a19556093e9 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 f1e619c8ac9..f1fc678e108 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 54adb56244a..31cb3adbb70 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 c8316d54f43..c11aaabe8f8 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 b66ded08117..652e6590d12 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 43026c0e12f..e646c0b3783 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 924845e30e0..9457b7397fd 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 983f9a04e58..b29a76f8003 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 ddf66061f16..da2971b136a 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 02b7c443663..521e6b29b52 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 b22d08713e1..1dfa2ce2102 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 69fb5036596..5877e8c51b0 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 0346edfca62..3e6f63d419b 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 a1ec53a0b0e..937b76c3b0d 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 40529e80a64..76efdf4a225 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 ed4a0888149..f5014b78cb0 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 a4bd6dee3b8..b95e0417013 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 559090a1dec..59ff89e603f 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 7efc9671dec..29826cd02ec 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 6a9232ca722..5e508c9b479 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 12ab2efb8b5..b9c3457fee3 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 ca978ee694b..0018fabcc02 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 1742dc58268..7ab8d4f75e0 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 1aae6a91aa5..d5af3ccb3ad 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 f6095648526..963803e39a3 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 3d6674215aa..a20699a3112 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 a8deee2f042..faaf4990777 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 983f9a04e58..b29a76f8003 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 23db67cc0f2..1759aed9248 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 5f24924972c..408ed7a923a 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 a3544b10f48..245911a26b5 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 c06abe2c91c..425b6226778 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 1a8c84ff3d4..8a38b1fc614 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 4a9923b9977..9b6df373b90 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 a545b1cdd01..60dd6f61cdc 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 3d444fac79f..0f9e66a6f14 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 4cc8546703d..f49d07f88f0 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 624a280ea46..f5373e78223 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 c6545dbf0e9..5fa52511a1e 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 4d414b5318a..4a69cb31c34 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 c3ff6839117..c852c502311 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 0ff73909d2f..e0c852588a5 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 facbe33f884..4ba3ea340b5 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 3fdd491ba21..92af4ad91b7 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 bc0cc209d3d..05bfde3f5bc 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 af3ffedfedc..02e4f6da31d 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 5a7ff308b2a..454562fa19d 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 1dcd158cfc4..a7f71d0722f 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 b6d2040af5f..ebf5488bfd9 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 daca94f888a..673e458abc9 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 3c68c9aa42e..22838c94e2a 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 751ee4036ff..5f72c29d2d8 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 bb8e425555a..0f86704fb80 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 c8107b3c4ba..7a1add54cee 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 b20747d128d..aecedaa3428 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 3b0aeed383f..9d2a313b832 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 3aacec97adf..d57bbff22e2 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 de5d9f18ccb..0f89255ed91 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 8c321a38bc5..c9c7226fe44 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 8cab348619a..8fa7383c635 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 894dba78490..a64b285e01d 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 555f486eeb7..6e85bfe3d3a 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 a9f087e5af1..85a4cc95736 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 19015549968..b984394709d 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 a6c0eed7630..47382823127 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 8a849f94a16..44bc6b8bc0f 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 82f5aaf4a24..6992d0f2bb5 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 487c2f8676e..3dc491e0895 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 90febec5491..609a01968cc 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 9d46b7ad0e3..865a354df42 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 b182ea7d8e7..1d61cc965ac 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 94f6e83fd6b..6b14e8850ce 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 992be4ebc41..d8832472b25 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 a6041d57e02..86a64287676 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 4d31561d5f0..4e198e3f6c7 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 763a1550518..a5682e8d586 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 20f8e18b05a..f02b6713692 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 f7f5de097c8..d585f56d378 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 4846096ea9e..91de0dd2352 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 af6fffd866d..ece4ee0eaa1 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 3905767de21..2c24da9516e 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 77bce59e93f..ed96635a5cf 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 ee043cec844..7c1c30efe07 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 a77c911fca7..cb92aa5ad63 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 705ed666729..e7bae6a59b8 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 f5d3fe0aa7c..40fbee9e0ee 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 3b0aeed383f..9d2a313b832 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 69585dd5a84..188973de9a1 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 a997b31bc62..cf8f9f9ee1d 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 8c321a38bc5..c9c7226fe44 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 664108c03bd..4b11a5832f7 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 42c59112a3a..9c8ed9b7f25 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 e893af5a057..7b05917bed2 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 a9f087e5af1..85a4cc95736 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 299acd375af..a11a92a52c1 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 c928a1b08d9..646d3f13c02 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 bb84b58a26e..1fe407722c2 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 6edf7445850..f0af2c79127 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 34a3645a538..e85e48ffd85 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 fa1e8792ab8..65f3442ee1b 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 b8a3f24ce23..6a9f133608e 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 1a7c9e97c83..e341d52dd81 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 f70aef653d2..6d0e50b3dd2 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 af691c91340..810b7aad4f0 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 0d3e29802f6..5e84b05b0f5 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 4740238947d..79d23509951 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 589166232ab..c29786b9579 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 f6ba891101d..79da2359b28 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 ff429d83630..1a3d3714bd3 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 e2cb23c6f4b..d64f9b4629c 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 fc4b71d1972..d0949a9c7ff 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 a923e4e8e65..fcb64c84788 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 3afbc71dee9..f5bd60878c0 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 d58319e2400..64c231a1083 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 0003be76d4e..1f1d0a58ea9 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 5f961fb6a25..3802cce2d45 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 69cd7c07665..970ec4f5084 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 14499f55425..a9f5e4819a4 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 1ba82b2a139..d8b97a02aa9 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 a5e1910f6d1..4292931ed1e 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 eaa18afd6fa..d62e3e4bfce 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 05967761fac..f6ab71b66d7 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 6d5851fcbc0..807d0902f23 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 a911c1a7be9..08851349a21 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 a529511fc85..e1972a29d9e 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 31939ba5fca..3375f590977 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 2589d4f0fea..9253ccd5638 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 8e06eb1ee83..2a40394c9c2 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 1cc68e7df48..8f9453b0d11 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 f09d2d5b34d..320dfbab2e8 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 8924bc4a9eb..a22f9ee39ca 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 1b9b886ff6b..626603a284b 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 9ecc6cad2cb..48ed1d97b31 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 0bbc2f7731d..96df59efd45 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 3395d06ba25..a6ad999f102 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 ec067387290..d75c23c039a 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 5a516ae4827..a4f17d4d692 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 6b6d3dfadb2..3662def7782 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 ca97d79c70a..c6314c58eca 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 22c3620305e..f207bef4c24 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 35e6cd00d5c..0f9df35a5f9 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 6881e387cbc..b5030a5b9a9 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 0e4c08a0b71..5777a4c7b8b 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 b87cbc0478c..37ec1ca5671 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 b7140894930..2775b3e237f 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 694a4a9f1cf..4af301ddf1e 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 23af7f078b6..e3f50a459fe 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 5c407abd3cd..d3c8c8f89db 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 d13a210ba30..d7b69e4e4d8 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 c6ee8b59679..bd6ede58821 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 2e655811830..4ebe9ae4b20 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 f75de77e65a..5daf37a098b 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 a5dff7ed557..433642990f5 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 16232f6f22f..b5c9302e5bf 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 6e1a1ad6f79..5d5c9d677bf 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 624d249273c..6186a1465cd 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 a4de3b5e6b4..e309867e313 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 6b3b90d145c..f6e3bbaae9b 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 1f80b25de4a..fcce0126bc0 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 487c2f8676e..3dc491e0895 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 1c9b31a8b0b..86da4de2af2 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 d40713c94aa..01f30d1b91d 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 2fec99fb1c8..2397297d2eb 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 6b1c3dc32a7..34cd0e3e020 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 e8e714420f9..76d137d6fdc 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 e0a04dfec7c..e60d6ed3d45 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 f17a3ec80c5..7a2c418244f 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 1cb26553e62..947486306ca 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 6a5866dcbad..0015e5f93d7 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 d52034c43f1..1f965cdaeaf 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 4e683bac210..beb19bd24bc 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 887cb812ac3..8535062b1e3 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 1fa3bde0a0b..4ac499c5fd0 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 b8d3ebccf6e..1799d1680eb 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 16010ab3a0f..960060824a2 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 e2c6a15a2d2..a1e71910438 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 97e775eb2a9..00c8ff52875 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 d5c2dab59ff..138bec7a4ec 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 ad27d3ad3e2..64dac54dfaf 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 0778a27c67e..c283a5ec223 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 068195ae946..047502e6ecf 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 983f9a04e58..b29a76f8003 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 c9af0573d39..6f3cc6c6c81 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 d12123cfab0..8322785f613 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 fc08c346fb9..106cc51a10a 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 e3fa9947fb0..51faecc7b00 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 1f350879213..567bdd21a2a 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 f9c6156b86b..f5aa7f557eb 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 5f6c6640901..b3d7b27950e 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 1c8dc0128ad..4840985072f 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 e3dfbebe92b..495971020ce 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 dc48879d6be..ec56080f713 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 0707622c4e3..5966355bd70 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 30150404d38..542f596e4cf 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 7a3bb603c30..728acd7a5c8 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 0bb31d50979..11f8744a4ae 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 02076794b3c..aa0d1cf5575 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 d1793b5394f..c86d654d1d5 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 7abcddd4968..f3728fa04d4 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 ee03eae5995..94828e78b77 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 415a2154001..b46bfec10c9 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 460b64e8b2d..50149105906 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 55b208ed82a..89540817757 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 4388f7b1389..f8c8fb64f41 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 2e9e061b0f2..07ca96bebf5 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 adf1a014c1a..03cc2c2241d 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 0e0f2d021f9..7becdc72906 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 0991e079c11..30e1b9cd6aa 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 6b1ef8c0408..8673be50a53 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 5c07388eb0b..2f785dea435 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 8c932263cbc..404eae8cc0c 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 88dbe2bdde6..c9fd1f54cbc 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 e9eac467440..5b84dcc53cd 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 56509265222..962dcaa09aa 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 84a640a528b..7c3583c7a08 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 86d12111d37..05109d5cf6f 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 84963a2c1b3..abd0778e606 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 1bdd0f6f7fc..953b5ffe369 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 eefab3b63d8..99a2d19f077 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 a015405f39b..d19cfac7f53 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 94137c6ead0..eaad172c427 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 e2006f3c63b..6902dca0af3 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 b8740d3f6a0..91ae2dd63cb 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 8ee1cb546e8..781374068e8 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 0211dd3958b..38d7402c16d 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 549eb3f52c2..2cfb679f7d3 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 a239eadbbd6..1de6e076aef 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 19f759b36c6..45c2f6fbbea 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 3798c06e1e4..aa18df08c33 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 3e53fb8835e..fbb832c4968 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 dc2166b0230..3f234a247c3 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 c54679d11c3..22e779390b6 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 c1784f6af37..cac1c33c2d9 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 2d321d623a9..1842251c57b 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 85a946ed6dc..71e4137b9eb 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 35c28eb477c..1c8e35eb64c 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 0cd70fbd3aa..e8dc870c58b 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 7a74854f3d3..f9f547e8c34 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 8d119370755..89158f8c73c 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 f8ef3c17e41..81f51bea14f 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 8e67cf664ab..b150f69185d 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 0c64f5d479d..750a9726a30 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 9bf1ed3b6f7..47f6bb0dc40 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 19be3efb3b2..7cfaee0ea4f 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 03ceb0340cd..746f20273bf 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 4ea1237a4bb..1839c8ac494 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 60e50e822cd..764a801aba3 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 9a20020f2a3..e2b4674e606 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 3e722515279..8e782c97f85 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 b03ca3b2279..ba64af6d15a 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 b6d261c4470..f48862540ec 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 5b3795956a5..86690bfb5c9 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 8e4b0ecde45..56612d71d47 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 bad3971079f..8f26adac038 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 885a2e359a3..7d9447e1f0e 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 dd9bb74dc47..4258f8b2506 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 968c61efc41..513c80eda7a 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 009b868098d..5f70edc772a 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 86781bea2d2..ff35e9f8f6d 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 2c6c0315a72..5b58e9cf00e 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 4a67e6ecb24..95a7abd8c7f 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 85a16f86e63..d1aaebbd982 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 1ce993457d6..dbde4d81ccf 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 db3ddd987e8..84f8dc729e9 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 3f1ab55e297..c1326bff856 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 9570dca0624..ad5f1679d10 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 983f9a04e58..b29a76f8003 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 70b08dec01e..1dbe5544ea9 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 4e926319697..d7c04918363 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 a6e4d7db42e..b84372a338b 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 36be3606148..f973b88c37d 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 f5edd4bd9fc..411b7cd1830 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 4cfece7d158..fb6abe58151 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 57827e8cfb2..78f819f1e7d 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 9b719133d9c..836686fa275 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 217ce3f41c9..1e7fbe7ba9e 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 559090a1dec..59ff89e603f 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 063702eb057..853c08280d8 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 34d90d696e2..4d53bdafbba 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 a63e1fc7a40..855e2e2b6f3 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 7d8c32d9c00..20c5e2c5771 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 778cba3e882..9934af0871c 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 1aae6a91aa5..d5af3ccb3ad 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 2fe8f613e48..6259f1b9fd1 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 27ffa9f8b68..37eabd34468 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 319d24b380a..0d956a2a24c 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 983f9a04e58..b29a76f8003 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 883525b62fa..4fe131b731d 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 dd90640b544..466ba049d1a 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 b02be928ed8..9daaab6de22 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 0dd2f9a954a..f4a68107aa0 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 37341fbf428..45667602c2a 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 e0fa35e0a08..ce59c36090b 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 7c20ad1a3b2..73736a1fcdd 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 3729a3900e8..e87371c22c8 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 9b7e501e885..caed511e643 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 facbe33f884..4ba3ea340b5 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 99950c8a334..dd0e533bde6 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 66f346df8ec..82fc598cc64 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 4b38566d8fc..d2e3f116b80 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 b1277f8e3eb..8d68eaf5e6a 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 e6e9e4b1cca..3de09c45cf9 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 5924e45bda2..724bad0ed2f 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 8cb2af66907..6662537e2a1 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 e5dc89a528e..5dd3b62985f 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 9f3b7393884..cc98df87d73 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 8777171cf85..03f439f41ee 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 67fad79c09b..45513042624 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 5a7df83ac6f..63b67e8bad9 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 e9bdb89f26d..20900abc1a7 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 dfdfc3e2daa..29a502b78a9 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 8c321a38bc5..c9c7226fe44 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 4c6eb7afc42..e87ddec98f5 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 f91c2704b6f..c75b93f0029 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 455a2833ea9..a36c53feabd 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 a6c0eed7630..47382823127 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 6c15796af58..8b6800c9369 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 095a71fb22a..ee18398784b 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 e9bdb89f26d..20900abc1a7 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 5030c7a350f..08368d367f4 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 8c321a38bc5..c9c7226fe44 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 a20e158b1e7..0d2f9da60d3 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 85453eb5c87..56854a1f5ac 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 5f80f39c7bb..b802653eb7a 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 7d348e38db1..fe2655fb12f 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 e447511e6f5..373b0b2fb34 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 414e80020a2..d9f423541e2 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 43ceb305056..fe3184b8ccc 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 8c5d588529e..ec9971d8fd4 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 ceaf33c30ae..72d9bd234aa 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 611512d151d..a06ab631406 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 bc5426a7d3f..c77301ac72a 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 11f29c538b7..f3181d40bd9 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 4425ae6ee64..64d77684509 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 5c11d487e0c..5531dfc0bde 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 45d16d16d56..c81150b32b2 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 4394473d4bb..9199299f1d7 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 53844d700d5..5ff800be0a1 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 4b569bdfd8c..5964d1ccb8a 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 01f77c33d2a..45ebb6ae013 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 99c3fe86c34..63ef96fe2e4 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 adf0b313b9a..2253cb5467e 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 0c1cdbb3184..f377940dd60 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 b1f936142d8..080451efa47 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 218ac4ec096..5f3363e46d8 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 569c8183730..9fd095ff867 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 76556da110d..2bfe28681b3 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 faaea815d46..8b68dfa1c6e 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 ba907df8008..557f3383855 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 e60f1e5fe0b..96d3c881f90 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 248040d0d4f..e440e9b4c33 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 186fe357296..a93ec68dd5e 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 c886449d3bd..5b0f0b30e32 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 003840f163f..625403b8cc6 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 4ae578cf1eb..2a3a1e3ad1d 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 ae47d520883..d0c643f61c9 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 d822a1afcb0..5b003bb4112 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 b61d95f0c9c..57bb5db3f9f 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 3603ae703db..e8b8cdafb2c 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 355171d41f3..fab34a9232f 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 0ec1167db49..d0b728263e3 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 3e5eb1763cc..3c4e5d216a0 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 3951ed05ab8..c0579ed94f6 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 e7ec4cc3829..8009675e8b5 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 4b161217907..c24d63f8669 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 9938691c23e..d47690ee407 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 a33d8dd6d6d..60a98b8a628 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 e9de223849e..ad2b1cdac64 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 0131b6abb14..8560d5d681e 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 3be49278bb2..bb01c4ccd98 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 2c718733e82..ce92b8351d8 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 db01a54b0cb..105f0426986 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 9350bc96781..7d0a32b1176 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 d78f9bce9a2..6ad66c30e9c 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 d75a7cd8a0f..014290432c6 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 b294dd179e7..e432c671296 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 0228a1c2a64..204c409aa0a 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 50f8d922ae9..3fd4cd95dbd 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 e7da1a0ec07..a5f026d81fb 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 41799faa34d..37e66a6ef60 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 cd48e23479c..64a41f1972a 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 65b3ff9f016..3f82e93c631 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 a14d8c71b49..6b4ca844b12 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 8f493308139..48fd654183b 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 84963a2c1b3..abd0778e606 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 afc98aa58c6..ac847adc371 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 88c898dc752..fad1c6d79f6 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 96b856de1db..e8a16e59452 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 853af5c2d85..2f09764aa32 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 bfe98963f53..6a8daa2b6ae 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 38050c0e4d0..498450128fd 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 936737c866e..cb725338038 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 02b6395cf21..71b79a5a17f 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 830e04a948a..8639769cffc 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 b54fdb29cfe..aed01e17e7b 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 f9b5c827f82..1142604cd37 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 c8a4679d8bf..63c5b6d6ea9 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 753a45ac367..8009b3b570e 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 d6f9766ed8a..3d585bcb686 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 703ce133ff3..aa19070eb68 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 fc429b3d55b..c2c3984fa0c 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 cc8e45420d0..d9c5ab51c76 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 f23db30ca68..dd29375f14a 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 3e63ef6c3ec..12f9884d13c 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 d20234921db..90ffed1f62e 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 8dbe26870b9..25f157f7ff4 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 cb7849a9496..3e14d069eee 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 3bacdd25026..6ce83f8078c 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 4df707496b8..007b2be8139 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 d234c524ce4..4345e1afb22 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 9de961159d9..a5b2ad401a8 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 0957e2e8802..1b734c07e44 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 52c9ad0a538..071b5ebabe5 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 ab5387fcbba..0011298d5f3 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 ecae40d6c68..449cb17f958 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 266630d9b39..c333d8efefd 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 54c74156367..965d7e71e99 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 eb39238f811..5da264d8d77 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 c93ec6b6758..9d2fe80f3aa 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 9b54f6ea12f..4d1f2aae86f 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 286aaa6dd04..ebf0ab05a13 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 7490c4121c6..df4bb4b82f1 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 ae08112a36f..f94076cb2ff 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 d48f952d1ad..332f9b23b4d 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 3378a533a75..85f4c0b0fc1 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 38ba2860eca..8d51aa98641 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 e4542c802cc..7e26c4a4647 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 3961418b38c..343d705015d 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 a41acacf46b..d3520d985f6 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 cf7c2019693..2a30982bcf8 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 199ce881f56..4d42f5fb64b 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 03ea8e8f6e0..92c1aba6c47 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 df6fc24f562..b2476c3d214 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 f5f79c39445..8e1719d763e 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 983f9a04e58..b29a76f8003 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 b266daf4b80..7f7d6026c74 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 5448e5df4db..d047f786ff0 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 0b725a4f294..c8ffa77b5d8 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 6851575d89e..8b2de6bb039 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 609ac6bba2b..163dc2cea5b 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 2493839ba44..58f549aafaf 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 f4e3f93c1ad..803b0717efe 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 4daa5c3dfad..2d90f10fd9e 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 6fdd15cb382..080266edf2a 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 559090a1dec..59ff89e603f 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 af746a9b3be..c6cc41b67f6 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 2265ce90168..acf568c4b8b 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 a8d2f591234..f1fd882303a 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 2a35f590742..ea4be892b3e 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 a5fdf0e353b..d5a38c57988 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 1aae6a91aa5..d5af3ccb3ad 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 d19e9c81be2..f5069429851 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 c4f0623fbc9..a44e5edf2ed 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 8d512cca5ce..d7e4177c324 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 983f9a04e58..b29a76f8003 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 f2fc38ccc7f..6b9c3268dd8 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 e75df89ff99..ad542ea229e 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 9e6ca38eca0..7e128299c3e 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 587598b2048..f5dd2e0fb1e 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 a7389c84e50..8e333ff750b 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 7f91a29b8ab..81138255ab6 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 4cd96b7a789..e071b4622ad 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 934164529d2..7f3715542ec 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 333929a4ad9..1d14b9d566d 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 c6ee8b59679..bd6ede58821 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 7a97ab47911..b460ef93dc4 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 d4bc995a273..bf5e9296641 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 0c4bf0011b1..374c1c1bbbf 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 83e8e277e6d..b2a6e764f32 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 884601f84f3..3d0564d0983 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 f3fadd7dbc3..bd5e4df166c 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 d1b009c2354..bdac6000e14 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 ea97dc71314..f75ee11589f 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 1ad3589a874..33479898e13 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 487c2f8676e..3dc491e0895 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 a5d0e209b02..541d116dad1 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 90a7db2a22e..fe1b202806b 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 fa1be324f88..65e34dab54f 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 5b4e9b4dcf2..4cb324a8b39 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 8af081cd038..73c35a1bc8b 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 97bb7baba30..f15c1528790 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 264548d9183..bb86fb6e3c8 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 81dd1577888..c7a64a1aba2 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 8eea0911251..599a70f0985 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 164eb1a2bc0..b2dc54baced 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 dfaaa9b4adf..b85f3dd46b6 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 db3dce1262a..dbbd42e32ab 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 2aab50e6b34..6e707ccd810 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 723d482e8e1..5eebfcb564a 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 1e28a3e07cc..eab33b637c4 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 5ecc7d01f27..cef33a0945c 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 47d7dd2c659..16fa66b75f7 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 cd61852b960..fa62fcffda2 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 ad27d3ad3e2..64dac54dfaf 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 04536700bd5..8d9f5c14fd1 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 bad6ae8ab04..f34094332aa 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 983f9a04e58..b29a76f8003 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 d73d77840a2..67603961755 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 b32fdbf7edd..bb631148c5e 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 d8606aedead..c36229e9d28 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 a9d134e9f9d..13775a7a0d5 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 013cca67580..00581114971 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 3cc8892356b..1e8d0690a4c 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 8c471e0506c..8e8d057b314 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 5fabf7041f5..a9686af9742 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 d1a49bc4c5b..3226fc20c74 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 028351f35d6..1f11e1b86fc 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 91c4b1dd654..f87b6f9ae05 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 694f92711c0..fd1be0b2c1c 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 f539684c318..4ebaaa0662a 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 7ec6c70a9f9..c39b34ca054 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 84fa2510e8f..668fc71a9a9 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 8bc1809b809..a2519bac049 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 d56096b8aa0..dddba4b72eb 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 52779f59bc4..8c47d2db5f4 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 e583064a696..fcc9c3d0374 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 55b229236e1..6572edda845 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 05a973d1509..2443347f0e8 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 f8bd4cce320..e12e8cfa542 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 21517e9c879..febdd2e8739 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 050c3bf3774..391ba37afc5 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 fed95cc2215..3d4cf329f6e 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 1d3857fe376..7626ebd4691 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 9157648b929..64d163ec840 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 39774cae138..331d1bf03d2 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 a6c0eed7630..47382823127 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 6fbbf14b7a9..8088ac829d0 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 7601d6059c9..e8ba75d2f42 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 d9043d98c91..cabb216815d 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 f582862fe80..4028248c573 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 7e7fe0be922..863565ab278 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 17e9fe6ee52..29edbc89a8c 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 a9c5f702488..040a4049c99 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 d672a365b2a..9156dca7e19 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 07c37ca50a0..ffc7b9e5d0b 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 585ab2ef8c6..d981d225822 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 73670017cf3..52f2512d3df 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 b6e22e6f6a5..1f365daf370 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 1e06df2b27f..c29d22e0175 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 c8fb7d296b7..f946617d475 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 9e337848b62..f54fc94e7b0 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 dea85dbf880..f0331efbf94 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 4c2dd0799e7..514cb40b3d7 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 738ae174e98..f000260dba7 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 35bf93598de..a61f1a40f3f 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 cbd0903612a..70115ca448c 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 f0d5a2020bd..57e59503322 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 86802bbc385..40ca7360110 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 69b12723c93..ba240678334 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 156715d5246..073ceb248b3 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 609dd0629bd..b817d2f9dd6 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 711dd7303c8..31ddfb90703 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 40fac68e067..2ea6fed3c3c 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 66df8a90656..864a0f4e9a4 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 c6ee5cd93b7..6fced222568 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 864d4533a2b..c022060207f 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 ccf1cd35476..9cb3f6ff5a1 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 2c25c5ac7b0..8f150b5e02b 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 488c57ccf38..0187138fa32 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 ce6dbcf5c40..4a1357149d8 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 ec357a89b22..13a2bbac3d9 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 588258225ec..b875f3c471f 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 c6bd9958d56..21bb404d3b8 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 5901d309bad..7516d7f23b8 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 b9d50d9b27f..bc84a49c33e 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 5904eadc86d..cee54d5452f 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 44352df7c3a..5ba5e7a92ab 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 a714cf28ac0..84452d1b953 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 291ebd97779..a902714d0f3 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 b29c5c3b39a..b85e671b6f3 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 dd42c111f18..7ddb3ed8870 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 4399075678a..a47dd7ad472 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 a54edf3e26a..d7f08858f53 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 faf07779719..9e530df51ce 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 b93a212bd06..5e8bff40bf9 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 57531eecccd..489f4310c22 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 5739918a083..1091133029e 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 67de5030d0a..42827f1d1e2 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 b58b9cd70e2..af3ad3fded9 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 8b012016057..dc18ee3e971 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 85cec608b3d..94c331b3dd5 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 95bca9f0a18..84acf1d486d 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 c6ee8b59679..bd6ede58821 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 c9f720c28a9..67261095d2e 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 13a285a6fe6..147798504a0 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 b31ba2a11c0..e6e318c20f2 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 d5962aed9a7..aa145cb647d 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 41f140d4bc5..12b8f431a33 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 e323bf060bf..9d6f739bddc 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 5ef53fd987e..228c9812133 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 105cb2d420e..7447c8aa8e8 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 0e5cdec7d06..81bab696639 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 487c2f8676e..3dc491e0895 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 730a09336d3..d45f360413d 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 de2de9cceda..268db909e27 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 7a1cd94cf6e..8def7282d79 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 f12637e4e1c..26bc62e9bf8 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 46e7efca887..41c75019b0c 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 e1bbba41476..c94ae39ae8c 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 f0c47bd0c6d..e23024841d1 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 ce378b6b5b8..660a14b4989 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 4bc210dbc52..d1b75451c28 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 895c82a3824..d978aaabc89 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 2a2a0a51b7d..a52ecc0923f 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 a7b06932764..8a3b91d2fb4 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 4ddc55875d4..3b908a9c494 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 4ed4a55a1e6..7f8dbf90c06 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 413cd6d41a2..c9cc986023d 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 03f0e55564e..4ae9cef61d9 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 c2111d2d1e8..a85c30559cf 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 7a618843be1..9488a496e7f 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 487c2f8676e..3dc491e0895 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 22a384794db..d5b03169d00 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 b04e7eeb110..d93624d4804 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 93036eb31df..bbc574e1eb3 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 429179e06fd..f004ab33eec 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 38e7c51c17a..9848dbc3beb 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 59cbac91ad7..0fb9829f6a5 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 08dc43c0caf..d687aa0d9f3 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 52ee525962f..142951f6ee2 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 66c078779d0..0874145e2c0 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 9e51b0b4aa4..be3b2376658 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 0febc6aab33..3260b8cebcb 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 ec0d6af2c1d..c6703d675a5 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 dc3f44719d9..a4bf1146ad6 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 3469a814173..187bcd97f76 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 634e44f12c7..757727a7094 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 b8d7a449a94..0104659504c 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 738f0a2e8ce..9e9d47432c4 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 531a6e7dfe2..853d4891b1d 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 049134a716d..ea80a8a0f0d 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 c94ca5f0b0f..7024a029b45 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 ad27d3ad3e2..64dac54dfaf 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 9d5e2555372..f7af2559308 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 bef05fabefa..90aee13863b 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 983f9a04e58..b29a76f8003 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 90e05f89086..8aad8e7ea65 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 93d20ea04d0..438293f1ebe 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 af49a88dd4a..29b06dd6f69 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 b087a703a49..1daa6febd8b 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 a7242afa19b..a32899ea687 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 c38fd9932d0..78d2b244341 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 c75360a2efe..cc0241ea767 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 80b57e26247..1ec2f9dc64c 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 b88e981ae54..5fd01d719af 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 e04f18cc550..a7391021720 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 907251dd1e6..41f384787c3 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 0ca2cb6afd8..63a50272745 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 2966493d56a..10cf292b0c1 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 f19d9478183..632d61aba64 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 156c1eed15b..410ce7342ed 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 fcc558e6af6..fce9350b300 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 b1eef13139e..9e5953ac574 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 f367c8ca252..38f92b2e896 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 eab681b1ab0..9725863bef8 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 d4df61796f9..75c1acd80ce 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 8eb5361f0f4..3206b3cca39 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 ed80bc7a1dc..43fae607e7e 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 7b18c163fe6..857d1bc762c 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 e38dd3b74c5..a3f8cffaf10 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 84963a2c1b3..abd0778e606 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 1043e79a3c6..a1709951d18 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 4acb211dc7e..5e74162231d 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 c0c408d8e2d..5c574b767f5 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 8b9b11464cb..f04ea5f273c 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 4b9c182be73..591efed7c7a 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 66f92a52919..1e6821fadf1 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 75feed54b8e..b21a4aeefc8 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 2adbc472acb..860d7387725 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 6ae8c82ab09..d383ff8f35c 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 ea512197b20..d576674a325 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 ed4374024e0..c9c6f312ec3 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 629132344fd..5233b52f1c0 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 4d4d0a1a9f3..402d8b96249 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 de569f65d8f..b5301b4c6a7 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 86bb429545f..92a78f3fa4e 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 6e7e65192a4..4d367a06371 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 1e5209c89c4..26c3eaf416b 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 b68a63b8756..78e541d421c 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 3639b547643..b06ae53e8aa 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 64d78435af1..41cbc583e25 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 8ef2248d490..291ad9d1d1d 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 d6dbde38c98..c837230a828 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 21016b9563b..223efeb51ec 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 0cd6af182dd..66d0c7d10a6 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 0233267d2a6..bf976f68c41 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 7d7919712ab..11fa3f23360 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 6fa5908772b..df994c7589e 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 66cf6193d83..494bb723247 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 3adb10606fd..2395c78e087 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 2f1a3aed541..1db5651e1c3 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 b0c351ffc10..b9bd7f42a46 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 140f252e059..b3bc466c9cd 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 428f8de93b7..0bf08c3077c 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 e2b39e7dc37..003bcdab4df 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 33cec198614..b166be87931 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 0973a3d3795..6bda9ac5f83 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 e09f4e6ffb2..6626450b55f 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 b8384e696b6..a5828950fb7 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 9d7a5417420..5716a3c49fe 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 188d4fc8208..5616a488a72 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 99929b91468..b657f35ba1d 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 e0af9666a74..37ab68d1bbc 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 cdeff8f79ef..9e49b000200 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 3bfa75bf58c..112c936ba27 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 36c8a292493..2a65e2e0a05 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 1ef98a59b08..159f162873f 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 f27f2f1a189..d43e7c4b37d 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 791f4bf0e8d..da2bd41dcaf 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 bb79a74d64e..9c94a0c4450 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 983f9a04e58..b29a76f8003 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 d3174864c37..951fcf59374 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 c38169c73ee..852eca22b77 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 b789db5d387..6a034682095 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 9e9480be05a..0c94551796f 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 d70d53872f0..e67d09170ee 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 ddfecba7fc9..dd0d7ce368b 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 fefd97ce107..00a13ecd795 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 cac7249d6cf..5ad444f9363 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 8cb54be75b0..dcce4df7a58 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 559090a1dec..59ff89e603f 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 ed5f11d7d0d..74e1b520f66 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 208c4b212cb..38a6523959b 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 e451ae1c987..503f2e458ec 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 411f073559b..01af05207a2 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 44239fd2d59..8419350820d 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 1aae6a91aa5..d5af3ccb3ad 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 cb67eb292e4..f7d4f684ebd 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 3f8e59df1d8..0bc2314bea0 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 ac982c808ad..3f1501248ea 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 983f9a04e58..b29a76f8003 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 e092c4556d2..5c8bdcb3063 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 327ed807853..339a5d34220 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 6da04101fb3..196852e8242 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 966f1c9550c..670bd130cf0 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 cb35c6a22ec..589035f8f18 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 1495d2cc542..55906c30e2a 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 f1422536bc1..ef87a0a78e7 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 92cb0df3190..a13d0299d6e 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 1440fea37af..b8f0806b2bb 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 a2b9e1ae50c..ca6d32f725b 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 7259244bbcd..cbc6407724b 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 51c7ee759b8..1d4f46821c5 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 2eb546fdf7e..696c3c85850 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 370a9a0a2b6..62f1b8c2d4e 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 e190f962c46..e42ccc4d0fb 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 f8d91e0bc56..6e566cd8470 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 6ac12524638..ed293aba19a 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 061047f4114..9980a23437f 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 86c3ff70aef..c4acf7dfc2f 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 8d49e47301c..4d37b38b6dc 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 f2fb4c7fba6..9033108227a 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 5780376c003..4ec6c7c8a57 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 eea033eee0a..be29d7d0577 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 1b9a310941c..f02733cf8dd 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 1ef91bc2cd6..131d31be3a9 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 12819d300bd..b17839c5634 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 6d9fb3e830f..13aeefa0c80 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 487c2f8676e..3dc491e0895 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 618dc20b582..7f34ef3d8cb 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 bf53315de5e..f3e95a6aff3 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 8fbbfbc9d9c..bfd109058ca 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 58f057f2692..b78acafe0b3 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 0b62f102b0f..fbcd2828288 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 7fe11e3b073..42a5ef321b5 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 de55ec56a0e..56727f437ab 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 6538ba4f37b..801aebf11a4 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 88045be5d93..740e5a2e5b3 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 7ce3cd0b015..0951e9dacc8 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 b738e2adca6..34355222652 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 5970a7c9009..b508c1a1a8b 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 bd1485a8f85..2c0a878b8b8 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 30e1b58e18d..02ca6774635 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 99568568b10..9b4e5e9c27d 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 7439ad94ab1..2b309c61dd9 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 ea8e41fb945..37da65b39bf 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 4fcad2c6f30..fd152dfc12c 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 a9f087e5af1..85a4cc95736 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 1951f74c86d..cfd723ff3c5 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 a6c0eed7630..47382823127 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 cd47572c89d..390f69f4578 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 091ed637ad2..435e04e2577 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 487c2f8676e..3dc491e0895 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 fe64ae72ae9..415eb5bc30e 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 50e32573ab7..9a7295c670c 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 824eac92284..08a8aea2011 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 68f6395e05d..fd42a94982b 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 431cfe1948c..4e60f3cf65e 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 643d9038e7e..373f3603a5c 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 a6fc5cc3342..34dea3018d4 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 1c4ce5742a4..93450367af3 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 9de566216a2..a8b6dc4f051 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 a905bc4e1ab..e557eaecee0 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 03b5bc8eea3..356558ec676 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 37ad923128b..ee4e4c4cd28 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 5c067a17a35..b985458c7f4 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 956e24f6ba6..aca4a2c8b88 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 e66745c9a1c..a21d3afc0db 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 d18b211b1dc..e35e77edae7 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 6af8ff1de22..fcccffaf151 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 58a08ca7753..eb52f384c03 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 40b7043b3fe..e8de2a56525 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 55d2a95c89f..3d747e73121 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 c81de2d7d19..28b0d14652a 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 b30c134a9eb..f373ed516da 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 1a54a57a3dc..efe0e9e3182 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 c1aa2e56f45..2b40067a696 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 715e9b74ea7..9db9c1bd87b 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 3c44f0d95ae..d03597e00d8 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 3e84ea50192..a595e305f56 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 325f8b5177a..5548ce96275 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 64b9d765006..32868c872af 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 927f92ca98d..189e3670d61 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 4c155c3ac97..9d29f761148 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 843e689b254..519188118ab 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 08201b827ba..f2dbf8a34de 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 6151bfce3ff..ecab2b195e4 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 ed1443d4198..63bb154be90 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 01360fe6345..55dc827aa28 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 4c0b9dbd7aa..d636a33e002 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 6a3924dca83..a2425c468d4 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 fffad20418a..3facc884565 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 8d262374caa..4742972a7f5 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 120219f0523..679e017069e 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 a115a224a1d..48895e1dd80 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 cb6a472991d..61b49bf5309 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 755f4a0a0d5..ed6e4396dd8 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 e61724aed93..5b25b4a84ba 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 378cf942123..7a19d9bd643 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 4f23020b133..6fd809af4a9 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 afe16abe30d..b613148e6a2 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 49f1f2ab85c..02bd356c6bc 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 9c4ac1208a6..1c2e379854f 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 b3187def7c4..f29cd97d1ce 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 35c6228dc94..b10e2db472c 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 5da2a116990..3072c65b332 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 bfcb6bb8686..d43ec30a87c 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 577b43383f0..ff866ae926b 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 adb306f49b5..b1dabfc5e23 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 78ed00ab453..f7b0a82f630 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 e430f93c147..90a4e08e08e 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 a1fc1c2399e..cf32563844d 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 4b32c7921d6..c697c16d421 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 82acec27e51..a9baa96a1bc 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 ceb4ad83e39..549354b0092 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 cf392536763..d4ded05577e 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 a73886aec1a..36b4db2fb55 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 195bf464525..e80e0349fdf 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 8e0fcca70f0..90b5f609fe1 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 6ff4e556276..559969a1bc3 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 572d0e381db..16bae64af40 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 be5d340c632..23593f04869 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 36b913dc26a..547107cc68b 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 22cb7e6eec7..1b3583354d9 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 6dbf2b0b163..7dcb7739348 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 72ccfc7c1d3..29955b9ea2f 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 63e22485773..1aeae8758a7 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 cf8f0cb4573..a28127c16a7 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 f391c4dae03..f35538f5aba 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 9b3afad8a6b..1be628004e7 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 84963a2c1b3..abd0778e606 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 347b775fc93..b2ad06607b0 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 397bcdbd7e3..4f9d5c4354d 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 df715182690..e42ae53a7d5 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 99f74600269..71d956d8ad0 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 fdda588a3da..ece3c4ef945 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 fa93a365426..2f861740010 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 0e1dec3307f..179edd37d87 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 4fa61c91049..de1efe41ab4 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 ba247a0b5ec..5f83072ebeb 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 3538f4f9cf3..b6c0214ea48 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 5cde0fffda9..9c2e14a1d16 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 867c91b9ee6..ba4b4943720 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 25237789a46..e5e4cf69553 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 b87aaa1ec57..dc14114906e 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 f550e2d1309..c4b6317b5b2 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 e390cd31793..f339598d9db 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 6d885d5eb3c..af307281e06 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 badcbc1aef4..83f219c2a51 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 d7c36537251..a68ff498d47 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 a22707a503a..2d6f94b19be 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 085fba0c26f..952bffd0654 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 2f42c3b45f1..b7617710ade 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 de3e69a30b1..68bfbc166e8 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 d7b27718863..f99c861e19a 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 0f2bce4c264..ea6ab024648 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 fcb062415ec..900f03527af 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 dc74a0a0851..4647da9d271 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 846f99797db..dd50f83d175 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 46adb4d330c..e694f9ab17d 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 5cf8e9ff1e2..85e941b25ba 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 64473b78cd3..082a9ed4b89 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 5888d00bcde..086a82f1c7f 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 8b34891075d..d42ff81cef9 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 f7a88a41fe4..04155fb5ed5 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 0c22129bf28..69582778a5d 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 b549c78cb8a..14a73e638be 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 e7106663585..2c215b9d511 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 db11e4e9659..b3d21ee16b5 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 44d6f058351..f189c0216de 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 dc0d68cfead..10d362c9cd0 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 c2a8477966b..d94d86da2a0 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 f2433ba51f1..aaf209d877f 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 dd11663b19f..5e0969a876a 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 234b9cb0a70..01db102ebac 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 37310ea18fc..4d232ea2c9f 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 a61e202d466..60f5bf1e3ce 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 4f166ac0a44..24844d0e123 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 83bcbbf0d1d..30f44bdc1f3 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 7813d9608ae..45a07537a63 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 983f9a04e58..b29a76f8003 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 d94875ba4ef..decc99d7671 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 339678ab7a3..880b8a00476 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 903df467266..cf9cd6319fb 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 e897804d226..bd5e64f75bd 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 6ae380621ca..b553ce646cb 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 9e82158e34b..cede6be6b45 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 d2b5d079081..72b96835478 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 98c0924cd03..c7fe58095c4 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 a9f87ea24b1..883294e7a95 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 559090a1dec..59ff89e603f 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 0f248ccb246..f5e53601214 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 84b62260ade..7ea03998927 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 e6b6b6041cc..361e944dc62 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 04942555e79..04148773c33 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 b1c11570556..0442c117f2c 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 1aae6a91aa5..d5af3ccb3ad 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 645f5975eee..dbda8039ec4 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 214d84670b2..6db7ea05c0b 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 7c7176e55d6..46d3a63007d 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 983f9a04e58..b29a76f8003 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 3c3d1ce8a84..c48dad6ee1c 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 12e6ac4b4a8..88c03b5f010 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 a81df7c10bc..3a5772b3ce7 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 78b38bd59e8..3a77f54e819 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 eb8b13fc82a..0d808f54829 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 bce651c0ee0..dcc797f73b5 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 1d27cc91dbd..6d19bcbd429 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 48aa54ec37a..4c11601292a 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 d7ccd0ac146..33877f3351c 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 52779f59bc4..8c47d2db5f4 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 fc0f918267e..a4dec6fe309 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 55fac81d763..00f098d87b1 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 f6fb2eaba4d..d866559ce0a 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 33ec40f7090..acb3f03b3ac 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 002dc1556d3..e78514ebdce 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 64d54254ca4..7f7300173f4 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 8b512d97cad..642a894f4bf 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 051a6b8087e..13a8c21e4e2 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 b155d79a66c..86a0eb9e4e3 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 3556f084f1a..22e21d83c5e 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 a39b7561cfe..b975de5877e 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 2cee0c21065..e81964a9fef 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 20584c2974b..6674d7034d7 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 9fc46fa72f7..a2400eeae94 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 c286e20564f..3e98fe58286 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 52779f59bc4..8c47d2db5f4 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 78261dc908b..f64dc8d4c2c 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 f07a8321724..94de09b0bf5 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 672eb35d4f1..8fa9ed49f12 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 33ec40f7090..acb3f03b3ac 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 fe9b7c44fd5..6ded1ab875d 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 8d5b5dbdbe4..db4f1261cbc 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 bebc1cf6c10..58052735bab 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 d32aede7848..2d048ca531a 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 8ad526d3e78..583ad726ab8 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 e908bc88555..f2275543996 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 cc9fd3403d1..2433fbf614b 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 a198eae3bfe..f12e9be48d4 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 d222ddbc63f..1a17743a3f4 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 e28376b3c6c..a4c6e21afe9 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 7371004e576..a70c4fa2958 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 52779f59bc4..8c47d2db5f4 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 d56533c2f65..201b957912a 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 17ba4e3dbdf..2b8b56ddc30 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 429e4d4e74b..9a77dac1d16 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 33ec40f7090..acb3f03b3ac 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 503fb13cdee..8c594a0de71 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 8f0eee79393..7c136d31b79 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 607e3a771a8..251b8345091 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 a78c3b82f63..89b3db14eea 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 c0261d705f7..1bfede11215 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 b009d95f2c2..ba2d47aad2f 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 00460b96e00..30ad4e5fc73 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 4944df31a17..c0e4a25f4ff 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 0c5a3610e86..753139409f5 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 1486dd1c4b9..90df4615bac 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 da40cada439..bd8bdb3b1e0 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 52779f59bc4..8c47d2db5f4 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 10817247bdd..72167d152bd 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 04bdd6db18d..8678c7b71a0 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 6624e0a54cf..66e7740ab45 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 c6ee8b59679..bd6ede58821 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 9ebf06ad244..f7304f677d4 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 73dc56fc667..2d7ca1621a5 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 0eb08e4f586..757e5393cff 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 8d92a3197d6..7950cdf0364 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 b1cc1813443..019472ac608 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 f2130256b3e..efa62821f9c 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 3ea601f1d13..1fb669bd6c5 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 8c31e73cad5..6b1c0fde63e 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 4986ece4f07..a67bc25f772 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 487c2f8676e..3dc491e0895 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 5f70ffc3aab..f4225a30a94 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 8a1dde6a8a5..2a408e68f66 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 ddc7097f01b..b7f0e7ea81b 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 9692a4ad063..f86d63a4a64 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 f3b6f34008d..15ccc567a39 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 9607b5b6830..fba3a14f0ed 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 93645f9b136..331ebb95afc 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 da928bc9416..6c1db25b964 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 37db804cd42..99b04484394 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 ab277d81b2b..fab56789f1f 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 929677faad6..dc96c4190ee 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 4c786bb71d4..ec290d75898 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 7ed30753ac6..f056966a26e 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 67078c6a502..d972f8be8a9 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 622951225ae..dabfc13c7c1 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 2c85217f26e..fe44c226e40 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 bc3cc2c7511..975af81e061 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 21e71021fc0..9316cfd7922 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 ad27d3ad3e2..64dac54dfaf 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 33091b7e8a3..29ea025e7d1 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 b96eb50a20a..996e4fe2bb7 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 983f9a04e58..b29a76f8003 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 486e451f60b..e9283653e72 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 0f0329363d7..a7277ae419c 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 56258b9c5a1..dc9a264f829 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 3f8e4ed0e50..9266ba97a15 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 7fd39e739af..dcf89ca98bb 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 6b8b863f573..b747d1207b1 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 4d6491fe7fa..cf5133e53d1 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 4b2c0b3d696..773a48ad79a 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 1348b1f9a96..327a61d3cc1 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 4b1f88d4953..b45310f05d9 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 5e75d71b585..6efe388b2b1 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 0ffec526cc6..1cf40735915 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 13b7a78cd96..4070d416b04 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 71e6ab35e09..c848e8be4ab 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 ed5b3a45010..989b33b761b 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 52779f59bc4..8c47d2db5f4 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 4687347dab4..e2d178e8d33 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 4483bdfa35f..1f60e421f2b 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 3ac43ff185a..b4d7e77e188 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 a6c0eed7630..47382823127 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 30586cc2ad2..b2da1efc9f1 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 cf9ac25d0d6..033854cc826 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 78898057047..587fb4fab64 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 d10e321b878..9075cc2da4c 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 d8bb272d043..77ddcaa3f73 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 a587f900372..8e516573674 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 1b6613ef47d..fef3c2fb93e 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 7e5ab66159a..17c5a1edaa7 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 4134afcb64e..120a7506fb0 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 885523ec26e..c083472cea0 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 b6f7ae0df03..030345c9f60 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 c770173340a..e3064eab82a 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 d9ce649c203..149c423a1d9 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 bbf2a457afb..4dfdb2b7a89 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 91bd52b527d..f67de5d6876 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 1c1e35af4fe..bab0348d368 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 4cf3a58534c..48d6faeaf51 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 4f520f8c5f9..507b28fe26d 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 3cff9a2b5a0..0b206aeabb9 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 cdc05d66102..d6ab5b55a12 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 05d4aa6a488..8783f6dda38 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 cf96295102b..01e25a8fe72 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 351b170042c..34189f3ed25 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 2dbd45d6c7d..c28f2ad46b4 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 baf66dfefd3..bf1f9039cf6 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 b9e7ad15efb..f422d61c1d4 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 f3130e2fab5..232d6e90a9f 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 052383310d9..1e3c226c988 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 ee416ebc746..5c655b3ec76 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 b308ee1aa8d..596f9842d4c 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 6d1aaaad79f..8c57b4c41d1 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 a920b6da1e5..e8e57fddc09 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 d14f5db38da..94b9d108558 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 8bef0b48e2b..ef8bd433349 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 392c1be551c..70b80c8828a 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 1fa6451b95b..15c5eef4ee1 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 8b6ee12b625..33f564551b0 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 89717a324eb..a1911d54fde 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 40f2e263b75..71000c1b776 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 f16451e8499..35c075d9e7f 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 8ecd8c61e53..18f71108e1b 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 f6f78ee5f16..332c1274342 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 a8952102fd5..8f9f4227e74 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 4ca11d98821..8cd95cefa3a 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 962490f29c1..b4f1ba9a95e 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 d25afc1a1b0..c23ea8be696 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 487c2f8676e..3dc491e0895 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 a50ae569f00..1f60cd841a3 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 024189dd003..07bb6de904e 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 8ba12c83d82..6c37b4a7550 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 e797c33dd44..6339e6b1747 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 104fec7d27c..0ecc16ba102 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 ae4b47fb293..ff0ba4f9340 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 96e4bd524bf..cdc2c878518 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 7129742835a..906c488c715 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 2a30886b391..cf04cd9f31d 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 d7293d0b017..ae26a69b62c 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 041da23bb29..d1fa9f260a0 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 a96f133e1a2..335d693e64e 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 d6dfda9532c..c3121f0a278 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 93a17496f21..3e317b8fe64 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 78a36f3cb6b..38994e8a4e8 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 f01f8257110..013e2ddfb03 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 e33f0863528..6946b8e1a2b 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 9384af94bdf..32f43f1e736 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 a2b9e1ae50c..ca6d32f725b 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 a6d3742eb39..2fbf256423c 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 c5b5fa2dae8..1b79a3a67b9 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 91eb7283d83..14d0e9742c0 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 9b5a8f49be9..4a5239f64b0 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 67de5030d0a..42827f1d1e2 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 156d700b3ba..76b1efe5064 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 da82ffd2b6b..f924d5d2e18 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 52e6b1ca542..ef2de8f4c64 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 63b7b7efb2b..e038d0992d1 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 ee416ebc746..5c655b3ec76 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 2af19d99ccf..e691a9a206c 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 a9c3bc2a2ff..beb304ec2ec 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 6915fff6457..377b457de3d 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 fde9095312a..77b77c32ed1 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 5047c435f6c..f7b8ab68e1a 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 924627ec95d..4a3cd1fb77c 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 3505048fbbe..15b254a98d4 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 b581d1d256c..93884444d88 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 c75a1c3790b..3240f469524 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 be254fa0347..dc207b79060 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 3445b69565f..9d072afdaf0 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 c813136c38a..a5b7196c819 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 07db22cd127..37ed6430a57 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 fbefbfc0f52..1b0f3c41a61 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 4ca11d98821..8cd95cefa3a 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 4839e8bae74..235f82af60c 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 102e12fd416..f6dc83cc604 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 487c2f8676e..3dc491e0895 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 4bb1d920f1e..b2852998ac1 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 7033c88f7d4..ab6cebba9fc 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 d14a289e27e..3e8ef24412b 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 75365c3bece..2e8be2cc300 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 8ff6f8563bc..3af37ba2f6b 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 fabb57303a3..34248f43627 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 2f052f5b241..2e73611c27f 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 21021b12d55..dba63b36e57 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 db20534ee8a..27b0c64a34c 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 2e5020740eb..2c6cd009a1f 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 92b380f61ae..6f4e7d60527 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 e5ab5d8d3ca..e2ea2aed1f8 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 de189c2a2fb..12198f5abd3 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 eb2231e793c..86a00d2fdcc 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 9c36f6833db..d7afa9ae97a 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 96382858d6c..c050651eea4 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 7a60a24058d..478d8e596b2 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 f2ce9259030..32a14af610a 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 a2b9e1ae50c..ca6d32f725b 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 07faaa67cc4..f34c18d6e19 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 7c82cb4ee63..bbf771b6336 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 fadf260e77a..e41bf1de08e 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 d9e2d43cf88..b93a9ff2b98 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 c6ee8b59679..bd6ede58821 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 6aed79e48c9..4e0fd6d57cc 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 ed2df3a5164..2536953ddf6 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 5f87621bde4..8b62a745d73 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 3ad225a5a0d..eb3397ace82 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 d5991080b57..4b2bdf84edc 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 15a491060d3..490ec8068dc 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 99629ce8881..fdcd67b6a69 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 9a9ce0557c4..8642f22bd1a 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 cc58cdec51a..fe7ed41f33e 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 487c2f8676e..3dc491e0895 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 de867c3aa7d..0d4afbdb63d 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 8db3eb60903..ccd9f383c03 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 7a99f57ec1f..2d67a8a8142 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 6ec514b8d97..d8638fd32d4 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 f55ffa1ce2a..257750f53c5 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 4bb45ad457b..c8b54fcd319 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 a00712fdbcb..f7f861e65f2 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 bcfaea294e0..7e2fd2b9648 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 fb14362bea8..3a7bde08afa 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 2074a56016d..f619ed54744 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 da1ac46ce70..f0f20fcfa3d 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 e229cfeaa53..8a7b2fb3457 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 c238089a776..2576f53cd91 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 6bad92fb96c..f784d34039b 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 519448c462c..b11120b520b 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 bd4766cc595..b769b45ede3 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 70fdb788c72..c5214cec25d 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 f2c611f7440..63ca44ec249 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 ad27d3ad3e2..64dac54dfaf 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 2f147501316..f89fd03e7ee 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 438b6def34e..4eab27d2a39 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 983f9a04e58..b29a76f8003 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 b3ea930dae3..9e0bf1d5601 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 3ced4fef3c6..62e384c14ef 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 1a237b36e80..7cf6f9a3bb4 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 e5d51ac7080..f3d91633ece 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 50f7754805a..65adc7163cf 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 9e5c998568e..9271a1d14d3 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 9e182ef6d62..168d820ee70 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 938a4bbf5e8..86d74ecee52 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 6c332f0e4c8..4fea9944075 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 a6c0eed7630..47382823127 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 75baeda5efb..b3db0e050b6 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 463403bbfb8..e3047293f68 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 2a7bd82d123..15fa2ddae15 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 cd56b1b5eb1..0572ff6d6ea 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 3877b5e3f39..21dca37669f 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 8daa473fddf..c8815ff178b 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 8a8248eee84..1d377e7e15b 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 80eb44c8136..c831bc849e7 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 8c5d60e6dc3..39a9de9982f 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 b5cf721d7da..5cd87da27b9 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 ff30168dda2..e911d417f49 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 4e91a6aadb3..04159585a25 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 4f3011b4ff0..e66610b369f 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 9b854a12668..221bc60ff30 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 99863753b58..31de00a88c2 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 0accac3c69f..98f179e7054 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 4b6762b66a7..3d2965d27f8 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 8872224fab3..cc8eabe9f73 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 4de20710272..ee79c8dd3cb 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 86d36b9399c..f5aa9983ca7 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 e66137b64fb..b9b795d4ff1 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 bdc220d656c..0f0861a11c3 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 fc2c07efb63..2dd6fddcca2 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 3855f3f6b26..3e7a3d5519b 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 d4036ff6ec8..8fe003a7b6a 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 68c366d7ac5..24b7bed58c3 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 1690524b6a6..8993425a96c 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 1c0b95c840f..5e19280af19 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 a32212bcec6..396dac808f3 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 437300e9f68..adeb4f6204b 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 7d2b8ee1203..f823d6b1a26 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 b51abf1eedd..f80d204156e 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 605bd06cf22..0b34b009108 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 5ca63b4dc81..6abb02c4482 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 98490e956a4..618d52c1bd9 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 402aedf94db..e7c970bbbfe 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 87f940bd6f7..1b483052f3d 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 f7ca95b2cfd..c53c0876ea1 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 626cf9f455f..a1194ab1456 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 11cfb9ae2ef..8286dc25fbd 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 5f5703d88a6..59dcce6c4de 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 35833de9fe1..d5060f92447 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 e35b3df4ed2..7229f193d9e 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 b40a2c49e52..36384d941ce 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 bd236d152e3..752c6e1a41a 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 05a4ad290c5..9ded0e9a7f4 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 ed37173fa5b..3639f602d89 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 4bc3edfbeba..5a27628af28 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 8f7a016586c..54a3f8afc6b 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 bb04aeb3d37..6fde26d3d05 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 cbb269de2d1..a309e61c22c 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 67de5030d0a..42827f1d1e2 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 b97e4550ec5..14440e4d27c 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 4235839a05b..2c6f29c646a 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 462ab187fb0..8abfc251f0a 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 db2df3898c8..d5d3556b9cb 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 c6ee8b59679..bd6ede58821 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 5830530f191..b2d485bdf8d 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 c1e193f41f1..002b9c18b84 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 24e6695eb45..fced3d148c9 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 56070a3d4b8..45947ee6300 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 3e68627cd93..a215b35f5ca 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 7bc5ec25264..b21133924e2 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 72d9ca48de3..d9a75ff4c4a 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 d6b7a48a380..fd418e4fa70 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 99eb258c222..f95df91cfa3 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 487c2f8676e..3dc491e0895 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 e00913fb6e0..344ebd1d60d 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 4bb309d3e76..1229822b210 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 d40e4b0a80f..17062afa782 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 ac1944324af..7d5c0a05c46 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 0b41d08c683..671df0be2ed 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 b22ee6e3d2e..793e33777b6 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 0e4f9d055fe..978758aaf4f 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 5f274e47e53..e1917867cfd 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 08cfc9c6aa7..b58873668e4 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 c7f8dbfeaec..d3a90bfd791 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 d43aee8afed..1a0ac4eb72e 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 be3fd2cd5ef..4c314e33e80 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 7f307f286f7..85a835a7989 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 931e56b28b4..aefcaa03511 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 f716a9f339f..c766969d751 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 247e80448ed..0f21fcf3eb8 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 b28b2cf1218..70ac26d4803 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 087aaff2296..d8f5878398b 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 487c2f8676e..3dc491e0895 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 e3fac707c44..369f11163be 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 4fb5ba1f0be..e515e400ba2 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 8799e1f010f..2c2bd06bf20 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 f16f905dab9..ac268af5fc4 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 514bd006d7b..f09a78af307 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 4103cda55d4..6562d950913 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 6f71c97d102..01fddab89e7 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 76a299d3d9d..a7d1f1751e5 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 0a02969d5c6..b783686b092 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 e451da29087..eb6fda86a1b 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 696c7453014..8af1da9f44f 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 b7e0fbf4480..d6d0da29d9d 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 fe321302ee2..82ad93b8898 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 3f8b5c23d36..1f1dcb2da27 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 53bb20d849f..02f78e953ab 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 5a6c791dc13..337bd75ef7a 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 29c1a41a9bf..9aacd954770 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 f7193b830d6..1a1342c0ccb 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 ad27d3ad3e2..64dac54dfaf 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 b3569cd2340..23f296d41a4 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 2b4c6c493b1..16f3523dcfc 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 983f9a04e58..b29a76f8003 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 0458f8e1c23..4f2c64fc412 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 fd3217bbed0..a8fc5d6955f 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 9f87182ccbd..719a1f00c7b 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 9f30a8e6a14..2bbbb928f29 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 4e1ba623a30..03a39069fd7 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 37feb4dbafb..c2304dc2d7b 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 4103fba932e..f39ee076b0d 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 76cb54159bc..4b47b5771e3 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 ced3a1d80f0..93bffa0e2e6 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 a0aa062ffcf..425c1416cf5 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 096523641ee..8cefed7ef66 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 5a30104bf87..b4c2707ec30 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 691f37e2e35..2ba06cab993 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 5fa73d39e58..a72837d783c 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 0d84ad14dfa..417acc35f8f 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 1537fac85f0..85e10645f4d 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 f021987e8cd..d647218b6d9 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 8f930574373..4fafc7538bb 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 b66e87e282c..f8f6e205037 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 147ddb5bb2c..b86819d6ff9 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 08e621567c7..148d072e680 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 4243a6ca442..9bbf728a9a6 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 4c462bfc3cc..6289381a0a0 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 67133de07cb..7048637b8ff 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 1aa5b1960dd..1496778d621 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 b8d234af3ac..a51a7c1eafe 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 e516392f6e8..ee05e8352be 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 84963a2c1b3..abd0778e606 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 8c8596e994b..4c11d047b48 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 03176928358..c9dd2435e58 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 7a7b956d750..a67c20b4360 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 87a1da03ad1..890f41278ff 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 018252d33f6..536da823d34 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 2e932192233..b2f675456c4 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 2657cfaf359..97f81071add 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 e9ed8ca5513..771dabc26c5 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 b6c4d269cd4..84c755dd133 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 ac93f7d4ebe..dd45baac946 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 f29fb8a35c6..0a8745f0c95 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 01b5ddb1fd0..84643cce64f 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 646db75d19e..d1619eea716 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 707d045fe9d..9d6868b8d10 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 38de4ffbb18..6476bbc87e8 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 1a8a62919c9..9c194d9a8db 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 c88d4a13184..57e2b055184 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 c9432f1d2ab..c30a1679cb6 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 91ce3727ffe..5c58c52022e 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 805db8949d3..c8264dbf793 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 ed596ff3bbb..90992c15a61 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 1e7b4543abd..533961185e6 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 0e713c45810..ed352369897 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 310740f7144..75667d72136 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 57cd5244101..3ca0c9122d4 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 e703dc0fc7f..2979dfb617d 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 c964355264f..aec4fcee68f 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 4376eaa89db..9395075013d 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 9159ba7e57c..f20679320a0 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 ba8246f3d01..2cecd6a060d 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 30b0b7cb3a7..dc90ec9dec0 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 c3bce82de0b..4a11a597dbf 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 52b422102cd..a5fab778017 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 56930e49ad6..f2c92dd6cdf 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 e4682a54d6f..17152786a2b 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 289e1632465..65ecf604326 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 53c05815acc..872a638bb81 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 cabfe7083d1..388de41ba24 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 56033a1daee..1bfc2fef880 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 841899b42d9..5fe01423712 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 9bec545dbb9..6235fbe9a0d 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 88f3c88bfcf..8b242c7baed 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 2bd9a2ce444..bc2cd360cd4 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 a4dc58f69ad..68ae095f360 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 9e910d89eee..b734e555f7e 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 cf2f28bc1ef..4396a552424 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 a647f36fe1c..970b64374bc 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 f4c4519edfd..8734166666f 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 023d4c991ae..6bf0ab3bcdc 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 983f9a04e58..b29a76f8003 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 ab6b92646e6..83ec38976f3 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 ffe222f9fad..8b5c4b568aa 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 500feadeb6d..fbc2174a9db 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 0b1ff33fb60..bc6f0170e52 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 39900a11d87..41bf6334578 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 7310b5056d6..25004422af6 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 a6bbadc6f68..ec53b9e018e 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 0906b37710d..fdc2f695515 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 a43bbf41a8f..b6109538f64 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 559090a1dec..59ff89e603f 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 4cc727cdbac..a4cee79e36f 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 a40b16e3bc3..a7ea52bfb87 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 e352bda9fbe..60997c94d3d 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 0c43a493546..b9c04f0ca62 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 f37b30ad6e7..ef9c77795c2 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 1aae6a91aa5..d5af3ccb3ad 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 d985f6a07f0..3e4dd317d38 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 647f5057706..04bcbe53c62 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 9315c2e8099..32b35d1e311 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 983f9a04e58..b29a76f8003 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 e3f062b1563..972a74140a1 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 7faa23c80c6..bd86459ada9 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 59c3aa7bd0a..1b284849293 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 1c13391d09f..537e294d312 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 b248e0be1f8..2c8a51addfc 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 75df7acb146..4e2517f5899 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 803b913977a..2a1fadeabfd 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 af6d6b54080..05ffbcce288 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 2a4c5b48ed8..6856b5e6132 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 a2b9e1ae50c..ca6d32f725b 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 b6879a52402..c11fe77c44e 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 721a09edb05..481a0acf4dc 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 46816b0d69b..a9fd6831d3d 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 8f7c71b3c16..0d74da86f5f 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 04e64dbc5ee..4189bfbe1fd 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 916a64cd51b..cb1d237f660 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 e3efb012b8b..3b15616aaf5 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 97f5f810773..3373f113064 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 7c37aebb643..4d45ee77fc2 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 e190f962c46..e42ccc4d0fb 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 81cbdb77db2..c49257f4c0e 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 64f183a5974..3ddc4750bd1 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 9c597f79cb6..33c08de2ad2 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 f7e04ae874b..8090921949d 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 c94b1694e74..b92adf7bb23 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 3889070d5ef..ab6f1b75b2d 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 286fb88eba5..a43d3e32486 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 7ee5b6a9bc1..f0885d52626 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 a41afa64725..7f9c6cb0df0 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 5f588979bda..9a567914d3c 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 2874820e443..e4f9bd50797 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 a066542abd7..ff31008dd54 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 487c2f8676e..3dc491e0895 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 38d13faf587..5f7ea9d5070 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 5e740dca5e3..960dcffc5c8 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 a4c57619a97..813ec770278 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 70983dbf84b..c806ab59dc2 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 b7dabd6fba5..29c2968bbc2 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 694fcdda4af..ab3728b4a1a 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 a683a3ebdc0..857ac7e61d0 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 fa5bf2a1f79..413d1545ff3 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 65691dc7998..61564c62004 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 63327aac83b..0b3f5a75403 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 a6918a55c3a..a6600587478 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 e231ad96e23..ce0b65776f2 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 9563561ea5e..5fdc19bf4cd 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 799eef30a6a..6e78919dec5 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 4fc5bef95de..97eaaa53d90 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 604365e7eaa..9c2e3252654 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 137ff493529..2e9b81a4e62 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 a3d7fa74731..3ba0b3ba23f 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 fce05faf911..7b4da4ccadf 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 c130649e816..06a28607361 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 2122c8a1cd3..6e3334740c8 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 42111227073..157677e5c00 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 482c43dab4f..31e624f1eda 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 b215e7e1d6d..b75c46497e6 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 487c2f8676e..3dc491e0895 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 a7413156c0d..c2f59b513ef 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 6d858a632f4..5c9f8231841 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 b4548afb08e..3922eceecee 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 84909a2cb5c..63445f31299 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 b0eff0ed7f4..2b82934530b 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 51884873c05..e05f242394b 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 af0abe7b6d3..0e023e70989 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 d5e4cdf997f..2d0f0b34e1d 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 4f387c95856..a8f76614008 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 8b14d5e8388..86632a3525d 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 b8b9441097e..539c8eee20c 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 42df86151d3..f0d8721ef79 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 e22c0c427c0..83e45f7038c 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 ed14fa8494c..4cfbcfee955 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 1670f48f16b..e85571c0bd1 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 7064e221ddf..25f714b0706 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 a4a41d80d71..37f9dd54f80 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 7e91b186a33..d5a678f310c 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 a9f087e5af1..85a4cc95736 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 9a6872f9f3b..089ddd9c87a 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 a6c0eed7630..47382823127 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 17d9b1c8a51..0bd874985cc 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 f7ba539fd79..9afec850e43 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 487c2f8676e..3dc491e0895 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 cba4eb68ba1..387b7a02706 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 256336b1a05..556e85c6779 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 fa7e4b931d4..eec5a05fd8e 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 d3ca788ac55..a2f33631a9d 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 ec7915c66a8..8abca973075 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 c568cfe5540..6ab3625f854 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 1af4e371680..66065683af2 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 fdfce21485e..db3ecca1fd0 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 27decabbca6..598b43a6b6c 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 16881886733..8b6c17020bf 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 478080a706a..4e5e11829e1 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 6822f5c350d..5066a65e25e 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 319ef04a532..ddb9e259077 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 673418f8881..ba7e94f5aba 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 062359cf1be..7def07c2a39 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 5ff4515129c..75999b5e8a5 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 c35081fb8e3..08e9b4dfa7c 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 e75ea98a597..92d25036eb9 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 c7b32e85038..25a61cc598f 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 2609239ce67..f21fc7d75a6 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 7daeddeef2c..46d2da0aecf 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 ff411ae3774..70098d67699 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 fcb3fd6748e..a544168cd30 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 485ccd3476e..4ae7416c75d 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 0de9852306e..53760fe9796 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 31eeea33115..40fddc68129 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 720613fcd41..807fef696f8 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 382104cd146..b50282d5df9 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 3996bdc38fd..bb8cdbdc2df 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 99339b3f89d..23cd9cf59f1 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 8471e12c2e7..fe6d9396c9b 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 7d0dd771e92..44eb48eda73 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 598cd84f21b..69e222ac5b2 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 01974524818..6917fedf58d 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 378384f1ced..1a6b1070f44 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 5b540ec0e56..7430c90c1fb 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 9d20d7e24a0..fbf102111d2 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 a809bdfaf3d..389e60af66a 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 a00814f8120..9da9e151271 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 2f08f5abcd0..3c0e76eaff8 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 22e0f66e62c..4eaef3564b2 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 5e471d94e56..e344eb508ad 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 96e3aa48c55..10917bdd784 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 bc10033ea87..03642b3e782 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 c6be03eb7cd..8968fa4220f 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 9f924270dd6..8fd896cecb5 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 cabbc3705c6..324313a382d 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 8528ad2acbc..8af6c37723a 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 e11c8109663..73ba0989f42 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 3837229a3c5..ccc5e093722 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 472079c3cb8..4d20ff5ce9a 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 678c45846f3..8f19b0e4a29 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 8bdbe9371d2..74337ed4fc0 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 5617efcb65e..644d652a00e 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 2c72a4e5647..c537b406bca 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 e29e7527168..4a2d9eeb965 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 7d444090a48..472f9a3d672 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 209457568da..774d92f8fdd 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 f217e57f1f5..f04920d8b80 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 cae972a5b95..26c5c0c23ef 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 1e2c2df1d6f..00cbd79d57e 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 5561d51d604..9a8553869d2 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 a578664b527..cdc3d644c5c 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 897c892c9fb..ba0a40e31bd 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 3b3e1d7b5da..f3b9ffa6300 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 a0991c24bfc..7314ad07ba2 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 66b434f1ae1..73a4195247e 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 81fcf55f8fb..273dca2cdb2 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 1a4b39f804e..69b22aef383 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 5cb00b22514..58e2e87b412 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 0ad0a112bff..04416c4ef88 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 a05cab50b5b..8bb3d12dec0 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 4771b82a3af..7378abfd40c 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 d2195a3d2b4..cd58c4920d5 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 7391cd6f575..9a1dc83a7f8 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 b9524e8d9df..de03205da0d 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 d33cc6a66e2..8cc1c6e7104 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 f7e12ee84c6..950ad7b3840 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 1bdb453ec4d..1abe411b3e4 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 b93ea417a3d..287a238f880 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 bcd6829204c..eb9fe6b3a01 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 755a91c2717..ee9b0fd4871 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 69d96fa1edb..8e544f381b3 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 aaff2b3f1ee..f3ed3f03278 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 b9a46cf5580..da833a692f1 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 e10d0b18d36..1075b67a070 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 d27a2acbb29..588eb5abf93 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 ac2f81cfc8f..1e434c48e15 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 e96053caacd..aecf8d4dee3 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 3297389c702..fe39e1d8672 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 63a516578b5..d49328faace 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 28b2ea677eb..3136b26e404 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 8759f5e4b1a..6265e6d84da 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 c6ee8b59679..bd6ede58821 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 98c1da48da7..8c42c1fdbdf 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 03c37f6c6a4..5af369022d7 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 e55c4dafd44..04f94ff66ea 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 c578ef8e914..f4024e6cf27 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 25d19bc5357..1d436cf89fe 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 2f862e00a21..70c8d65b50b 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 8c438980379..aa51e978388 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 994b5c4db64..2b3e3728158 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 4e961d627ab..a4f4630ef37 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 487c2f8676e..3dc491e0895 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 3ce818bfcbe..51c9a93e3c5 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 92bda991638..2d8d0c75493 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 f024c13c14d..71b0ba9acb1 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 0690eb5f5ea..3f182f80b43 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 9b67ce9d5c1..3a2706258d6 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 2689c37b62f..638cd99e266 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 3b91703e462..f4123fac048 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 d7a7957b3cd..0c01b0f2f23 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 31ec9b10a47..4a5a95b0382 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 f6952a00496..6ce3d21b8ac 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 3e54c947d55..5b395adc338 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 84c5310301f..02cc734735c 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 63e08210791..42b216ae5dd 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 59e0715919d..831a4265a11 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 1c2ef5bb25a..e29658804dc 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 bf94c96ad7c..fbbcd204d48 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 1117ec9dc11..603d465887d 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 585e65673d3..6551b525668 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 ad27d3ad3e2..64dac54dfaf 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 602f31327bd..9bce40dd3c2 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 591dd130ca4..522fce3da65 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 983f9a04e58..b29a76f8003 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 40c3b865449..01ad70f5e3f 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 372e622f25d..22da34a3910 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 df9ccadd191..f4fd4d676e3 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 6eb96dd199d..fcafde8ef6e 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 1fc7e29c3d5..99568c9066e 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 2f1ea404f8c..88767dd87bf 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 f27d38939f6..2ef494b17cd 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 e03b238d5fb..f14bd7d8208 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 7c23be9ee84..9fd34928050 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 63a516578b5..d49328faace 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 3f9bd1696ff..5b9f5ad4961 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 9168699e177..b00396357d1 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 59cc1848f17..e15653f2f3d 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 bb12f00731d..1434ccef9ef 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 1b9e537f7eb..a6128799a04 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 0a64320e15f..7e43dc4b834 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 54b1ed78cf0..ac2406fe5cb 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 3ffa778f15a..b56219a550e 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 fc4079e7d3f..fe58c1f23e4 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 4dffec40602..b3681979a61 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 7778bf581ee..e296cd48503 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 c683688bfb2..b1a6f26a5b9 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 c2277465092..3ccfec8a548 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 d58dcb7657e..8d04aad8736 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 b7515c2a91f..90b4f5902e8 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 57028e9aac7..2e1ba96792a 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 8baa987bd2b..47972a577f6 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 b7d9e09202f..ebbd6af5b89 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 4e62b834f3e..622e8ff85b4 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 e9bdb89f26d..20900abc1a7 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 44adbebc91b..45d2d51a11c 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 8c321a38bc5..c9c7226fe44 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 62d77d95471..0637ac5018d 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 26139543bae..77f59d641f9 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 111fa76f334..d2d86f50ea8 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 a6c0eed7630..47382823127 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 b931754a2d8..264d430b225 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 d83c3c73771..d6e39d2d766 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 e9bdb89f26d..20900abc1a7 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 7bad4942f12..831207012ee 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 8c321a38bc5..c9c7226fe44 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 02c28349dfe..4d5fcd42ea8 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 acdbc938566..758b58f068c 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 06eb018ee05..24758ba5999 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 bad97b9a272..dd485aa43a2 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 2f2526b2d5b..9f496676ebc 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 3ca43c7b4fb..33c11f658a2 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 3fd71964d82..5c72cec2fcb 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 7f4653dddf5..2029a2f6c6c 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 ab642903a54..b7082d353ea 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 630476efb72..8df506bfd0a 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 0be64150777..1d653a794b6 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 868ee3aa4f3..951102ec252 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 5e83710f9f5..44cf7c6fb6a 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 a5c1cd22713..3d7bf52a242 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 78519bc1e6c..a6f26991ef0 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 d1836b85d39..0d787f99343 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 427727e430b..6741500ea23 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 25501fb55a7..2115e3c4567 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 337db398412..b1506a4e1e5 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 b0375beaeaf..1219df89235 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 31f03fe8dd3..4db4076b6ee 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 c7d14b44766..3b27f4dec9c 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 b9570b24e38..88f9d179ebe 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 29c815fc128..0fd1bea1706 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 d5dc060e3c6..0363e587bbc 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 fb6d2546f74..30bf91f44ec 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 2031d8f2974..ab4ba83a5d5 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 8fc4808c0e6..6f89db6fc34 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 8ef46b6e9e0..dc4e8768756 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 560bd3449d1..e79b625d2dc 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 aa90f0d6036..c4695c0ed21 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 cc8f829ad72..31cac9d951e 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 ee091daf63d..7876136b11e 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 a6dc7ec7fe0..ba6c92770f0 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 0ec60509bab..021a02400e6 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 aa2a70ad647..363f0e8123d 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 559a211b885..1d9b80c2308 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 590af2b2669..e407c5d7907 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 38b093909b8..6d3e3126d51 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 27b8b604dbe..d484ff99209 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 d0e3e506488..0e9236c800d 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 ef43dfe33a0..d56fc627f8c 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 16d42b61a9a..91857e99b04 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 09feab94f5b..5d2573c14b9 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 a8ed69ad1ad..262fc411122 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 c67077d1406..f6d8df94475 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 9c0e63d5daf..6b70ccdbda0 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 2ac70d5227e..27a165511ab 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 953fb1ed5fc..0d1f62abf85 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 f3810a96329..d6c2a7a89df 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 cbd6dbfee18..696f225c906 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 18ae368c7a9..0c9b7113f5e 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 3d018021015..da7dbc4ada0 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 de37484e98d..f73a8cc4f22 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 90b461e8ed3..fd720f53174 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 5839b64d468..f9617a3e3a6 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 bad81ad954e..6e2f614712b 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 aa1c789505d..b070fc66ead 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 6dd4c7c11c3..c9c209990f4 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 4856d47c606..4c552b01d92 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 952c8abcae8..97eeb80e365 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 81b7c481fb3..132563810d6 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 3344f4775f1..4311e611775 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 76962dba654..ac27cadd106 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 525ac4448a1..fefeed5236b 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 52779f59bc4..8c47d2db5f4 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 ec368208920..9bb3b2245b8 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 742099a6a49..cd815ab1151 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 e2cd6b89c78..ad7758ff033 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 63a14620d21..db8b1b549ef 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 78d2fc67d46..18d13c77183 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 b8c756e69e0..3980bb39fa9 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 63a14620d21..db8b1b549ef 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 ab08833f38d..da932037fcf 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 60504380ba5..34225a98e46 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 63a14620d21..db8b1b549ef 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 2e86e611ab4..f4fbda1fd91 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 c99ded1cc67..e39e556b727 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 84963a2c1b3..abd0778e606 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 5e048116640..d14485af4fe 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 3cf7dc93c56..ad6d1303bc5 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 0fc61fa1317..8ef385a5e33 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 beb75921c03..d6e6ab7f8d1 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 406ac26c3d8..31e382b55ed 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 e1eaf06e52a..aa7e921102e 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 031a3d5fc81..d5abfbf1f22 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 9cf413d0a2c..417fcb885cd 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 6e77c8b8781..ec4008f436d 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 80113752ac1..9129bc0f65d 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 dfb40e658c6..757d06e6440 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 43442358912..8be7302b9fc 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 23a73766254..fe3a401615d 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 9b8fa68637d..68c61ab372c 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 fda6ad518fd..399c32a681b 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 4c95b5be1a0..642f3168af9 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 1d56db9cda8..16ef42d4d5f 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 ca0d51fa995..c8a4c4c076f 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 2c9aedfc8a4..5316189950e 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 389ac7245bf..8d3a809341a 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 a816e01888f..350b0dc442b 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 6e4399f6222..dcc718e2ae3 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 c9b04e36539..991fc50f9ea 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 ae4c8832f8a..faa17685b8d 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 d90a099b1f6..df4e0ca29a4 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 f98a1f4dd51..872be7b8864 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 b3dfeef23ab..eaa0aab4274 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 f1b8e4f2e14..6bc88f86c3e 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 db52f99ffc6..9a393c448ac 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 e058309c5b2..789e6ba6ad3 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 7680d6e8f01..69745bcd0da 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 96ed1699850..a59168b7ecd 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 2911fda0c7e..b13f4bcbd9c 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 486767020e8..47c7ed60b08 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 70f5c9913ef..aa3e6fa7a3f 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 5916b6d86ba..e62830817ed 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 0705e477f36..a5d2fd01ad4 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 56999179b8c..ad3adac0b20 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 c09d9e02b28..433b2f999fa 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 0a4242444ce..221f000aafe 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 f53559f69d7..ab306746b77 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 170aed8cafa..47edd80f988 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 5171595d226..4bc0749e36e 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 3cfdcfa8d26..85a2820846f 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 17bf3f82aa6..b0ec6cd9572 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 a2f5901265d..80dd675f7a5 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 37741105458..371a3a425b7 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 919ae21ce4f..04ebdcd6171 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 15276d97ac1..c5ce09e683c 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 983f9a04e58..b29a76f8003 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 ae47f791777..fd491e2fa37 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 3284e76d2f7..35a01d8b692 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 dd2c847c4a4..1a821bb323a 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 267a9e591b3..a35cf79e79b 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 743f7b5c2a0..981425cfd9e 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 fcb73b3f588..26bbdb9e1e4 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 b0397b4541f..c94b7b9bf42 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 4d1705732e5..8f22753b6c7 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 50e15d0c69b..6034b172c66 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 559090a1dec..59ff89e603f 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 2292d75b7c7..16fa972c3c9 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 0562c837fa9..fbde5d1af06 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 b9ca37ebeaf..da692607e5d 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 b92cda04bef..8e989fcd035 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 961347a67ba..68ef5ff69a4 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 1aae6a91aa5..d5af3ccb3ad 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 106ec7fa5e2..3d0b8333529 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 51c9230da5b..e72d919fed8 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 12c9d396631..839d53f6941 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 983f9a04e58..b29a76f8003 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 84d2f45c2e9..99bf03116ee 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 8fc22e68310..312f9a2c8eb 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 43a6b1ec8b9..3e604f07db5 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 d8a75c37682..6d304df54c2 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 95075d66c22..bf4b8940243 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 21fe72ee45e..bf4ef649262 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 c5ca7ce220b..f5d52d90981 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 2840848d7cb..cdc0efaeacb 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 0df0a683646..f0299cd4cf3 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 8d51b1d4c02..1a1cc3031d5 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 21dc7dd1719..448f8eb472b 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 2dda1191690..6fa10064cab 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 6a9cfb4f636..27d587e0603 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 c6ee8b59679..bd6ede58821 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 699a124b262..9029ce95b99 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 fa1623625d4..617756fa8ba 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 ef638e52f2e..bd4f44680f9 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 fb9d54199d6..c3a8559c496 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 413395a0718..d5c13dfee53 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 11739e7f874..f23c5f3b561 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 99a69986ac7..f36111bd2cf 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 183c888e0ce..5f3ca773d20 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 14c94db660a..b9801f52cdb 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 487c2f8676e..3dc491e0895 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 82c7199d64b..6e4d7f04b8b 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 83ac6c8ff4f..e8f3debe432 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 17313326942..3666e529d22 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 b517bb538ae..9bf1de91c9b 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 8356669e4f6..184f1cf1d4a 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 43683aae5eb..e39bf6232cd 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 ad268f99da6..8b04b03be70 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 e632b270764..c66c4bdb5c3 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 dcfaa0ad17e..91f196ec8ff 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 8769f6f1b55..b53e79449dd 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 7b7f68e73e5..44f10f2fed7 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 5460a89281e..a2e9870f4c1 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 0bbf27ebe55..d8ab9f6b119 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 68d48a0422a..60fec291822 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 fc29be909f5..6580d4c5a85 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 b351b218009..4323f7a5717 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 fdb1f9d5cb5..312b11f9428 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 4fe8d5561b3..66850b514ae 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 ad27d3ad3e2..64dac54dfaf 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 de8ce1802a1..5063f9f2d92 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 e5114d2784c..096658f8688 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 983f9a04e58..b29a76f8003 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 0f5cb4269c9..f5adebde25b 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 08a12025215..3fef3598881 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 27d5f154aa6..59edbda3af8 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 b9bd1a45b20..97bc436dd7b 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 a4dc323b092..4a5a7260d35 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 94199d7ba0a..5ccff0784a1 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 6ee77668a67..51203cb605c 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 82c74c104d8..315dd2d9334 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 fc7fc3e2d03..99e4752fc36 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 028351f35d6..1f11e1b86fc 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 d1880fe9d52..1eebecb15c2 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 f28d2251cb0..7212b17dcef 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 7ebedd24280..deeffc0b22f 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 1afd1283974..3c771f27b4e 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 de256c18588..2247b416b5d 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 7581692c0a5..0679327725c 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 45254909fc3..78eff394cc8 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 52779f59bc4..8c47d2db5f4 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 15c8ed7b4d9..130047a502c 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 e392d07200e..a55b8892596 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 bddb66ccdc5..d9abe2ba417 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 52779f59bc4..8c47d2db5f4 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 5f0fb5c1aa0..8d7da88502d 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 a209974de22..a18e32f72a4 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 1af2c745b81..1e2bab55570 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 9085068ffff..69805fd6116 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 6bd4ea8cdb6..62fb7809a26 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 b3bca099de7..ca3cd0f03fd 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 2831e3eb7a8..bdc48ff192c 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 e3a03356af5..2553e05930a 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 9085068ffff..69805fd6116 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 eaa0a4f5b61..cb1d8c95240 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 ec36af5c389..8ea1a369747 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 3ddf7ccbb8f..a59a3949c3c 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 6314c8d550c..ddd9a783ae8 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 9085068ffff..69805fd6116 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 9fb3835d21a..b5b01f2e045 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 780ce14d405..e4dd37eaf78 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 cdf1f968c55..f7e0f63a746 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 351ac46da7b..f5d965fb70c 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 63a14620d21..db8b1b549ef 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 7a03080d9a7..342694bb9bd 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 b44e6cae8fa..ee0294cd684 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 a6c0eed7630..47382823127 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 758c0abd91c..d21a7f5fed9 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 fdc2a4af220..1ee68fc95f9 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 79e3ea4c55c..e200f4835e8 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 77419b3c878..64fae814e8d 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 97313e9f471..85d51851e2e 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 689a811f250..5b7d13b9657 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 80116262ec1..c89dea6edde 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 74a33830936..3049f7babca 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 66b314d995e..87d1b972792 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 3b0a6a869df..89e5e6ca397 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 0113bfb38a7..68105d4896a 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 3fbedfecdc8..013119d151a 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 9a652006352..323fbe744fa 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 3f2abd54ad0..fec81d4e68b 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 c15d17ea627..082e4baaf30 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 3677db8b321..7dc3d4aa394 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 333615690cb..6a32aabe162 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 6162d9049dc..d5476038353 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 525eefcf4b3..d91aea85c0b 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 e2a6baf14a7..612a3cca13c 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 1782fbbe597..4e4f93d8724 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 bd1897144b8..7511fef7e51 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 6db575e04c2..c804025c933 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 8e67e37b589..a9a34a27637 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 50bcee98b1f..e27276c1167 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 dd8798b51db..93251380d61 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 7480c978f7d..ce94f23ab57 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 792c4f589c6..47292970aab 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 3cb72f8b0df..27b4e05d2d9 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 f9642da3778..f0a1691f20a 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 a68e4676526..87836ff9d44 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 8cfac6d8556..3a6a1001ca3 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 5157d3ad8c9..b117c069431 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 19e62098e5e..3ed0fef8e00 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 33fbb7e7d31..621a2e2ec3a 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 128c69f90d4..557f24c8930 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 fc5a061e886..666bb92dcf6 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 8a0bff122c2..6756195d2fd 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 90243949263..d967dd0ee4f 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 6dff281339c..ba6179dcdb3 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 bddd29bb3e1..b87085e5043 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 b98ac8d2a6b..d49b9d8b810 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 1fbe7bf0b06..37635501770 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 a1a5b0a20dc..776e38adf32 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 111510998c4..36df300c808 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 a027ab23030..7ae48622093 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 c53675d549f..ba62ab47458 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 abcedae9291..0b3cbeb3fdd 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 a436dd4fd0a..53e2a00f964 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 1f6da01b619..96e9fa23321 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 ee7d15ea879..dade2d90820 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 8ce970c9f02..27e5e673030 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 4334e1559b9..b193f214a7d 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 9f588b0eb5b..1c90e75ce34 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 90be472cd78..5ab9b904c4c 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 deabaa1cd0b..9ae6106907c 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 fcdb8ff6c38..e69b97a8d1d 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 e8b5614c873..8099bec0da2 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 8a5ec9cd99d..68d4b34b0a6 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 6c9561b24eb..e24bf665ecb 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 6bb082428dc..bd362cf3324 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 8615c9fd130..8c0a27bce7f 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 fce66aa9b4e..c525e89d6f4 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 740abde2fa3..15a11b2f93c 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 56fbdd6608f..35ef2d7334b 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 9db7cdcdd15..64b50093fda 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 6fe6367eb51..a63b0d080ff 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 798da875ae1..66ece51dcf6 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 ba2f16bc3b7..58c00682d7d 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 9cbe13a87db..a4482326b46 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 5b5a78dd370..cdf4dfc766e 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 125b52958a7..4b41e31e89a 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 e309b41a168..22aae8d3797 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 ffbafc74242..2e67272f9b4 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 47b68a530dd..60f469d4b69 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 bd86a8daf9a..10fc0fbdac8 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 d7863f31304..9e9887887f1 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 3e24a4792fc..caeb68a1b0f 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 7d6d6fd603f..5a9c1dd134a 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 363257a1f63..6313543adb5 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 5ee7a49bcae..c7f0679a508 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 128cd52908a..bd950c4fbda 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 84ef2ac6d91..b258a75b999 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 8cf2b29dfec..8728234c0f7 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 d517a8e7cdf..81cbe919a35 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 cff41466517..c5140ef758d 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 528b014f3dc..bd9db6909c4 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 ed8535717e2..a4fd11284b7 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 483c363ca53..b5c50a82f25 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 e9bdb89f26d..20900abc1a7 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 cd4537d607c..ec4a7c308dd 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 9819cbc3592..1a3eaa8b6be 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 733ebb62c08..ee8e29703c9 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 94fa200b2d1..3a30e5761be 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 63a516578b5..d49328faace 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 466b0efc387..1d04a51db36 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 76dfdd56364..efb99fae8ce 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 c6ee8b59679..bd6ede58821 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 3723cd964e6..8ad6f64a986 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 f45e09f3cd0..abd5f84184e 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 4b28e5698ca..08d18b6e004 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 1c01528085d..9a4600c55c8 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 81e3f7c5fd4..ccbea309f68 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 2ca194261ac..66b8c8e8bb5 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 3cee3f426ca..3cdab6fda83 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 f46ae01f678..9a7e4e67d43 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 cde07123f48..a394d61758b 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 487c2f8676e..3dc491e0895 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 31bb419ae39..b7401a711ab 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 82dfbc4b756..61e565801b4 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 8be63b586c3..8543565cc61 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 39d79fa0404..491d4663be3 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 2100b3818a4..9d40438e9ab 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 7f076d1a732..f9a14f2795d 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 76c963eaf11..d152386d330 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 eba7ca46a98..e5d9b1acf1a 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 479ae91db82..05b613588d8 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 20b1f1fcb1b..47fbe945f7f 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 3ece6f8e843..1032cc4d67d 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 f3f09f16b52..b627198f7de 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 02386d21b9a..fb19e55046a 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 5263db25141..5fcc6ea7b88 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 00507740937..bce4158c606 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 a1ea5d64205..d18269d3f2a 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 ae931fe9b5a..a38c751d95e 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 34ce4fa77f7..0ea214add56 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 e9bdb89f26d..20900abc1a7 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 d2da29c39a4..374c5dbcc92 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 9819cbc3592..1a3eaa8b6be 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 05670e3f7b6..96197a2f03d 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 131eb781363..957e9b1894a 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 63a516578b5..d49328faace 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 db945871819..cb83f1f7eb3 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 6573f78bf77..cbecbc53aa2 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 487c2f8676e..3dc491e0895 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 d140271002c..4953df4f9a4 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 24d05548163..9a6d291129e 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 1be6e1d8c2a..d8c2f582815 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 f480a7654f0..baf4fab27b0 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 1897bfaa532..d0efc163adf 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 134371abe21..1d83e5164a3 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 4b1c6ca368b..a66be29b20c 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 cbe396e9a2c..dbf84731c50 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 a3bb9e09afd..1d6c6430ed7 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 fd5346b381e..a20b2182dca 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 d62b252d69c..4fa3cab2b9f 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 4c4ae71321b..64c8f0e2dc3 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 3145e1e66b7..db54a757a1e 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 4a14f61a47c..a0d16b610e8 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 87fab5a63ca..d4380c28d3c 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 a32c1f1e0a1..346bdeb215c 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 fdc5991699a..38ed5a84030 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 5e7839d603d..df859eabc3d 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 ad27d3ad3e2..64dac54dfaf 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 0f1b1962f1d..540ebb7e786 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 863602d3f25..31bd0a12357 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 983f9a04e58..b29a76f8003 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 8e487f6b896..8c569b96e72 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 1cf4b4be334..fd77408a7b4 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 0cd12504ed7..2021ec56d92 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 c1cc10caa08..deb25a038de 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 89e6ac69d22..0449afba1b5 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 13d4c757cc0..d23da442fa6 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 de12cc6a7e3..1a32736021e 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 c5f64fcabcb..2ab45407fac 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 e6ccea00bf2..4452e83595e 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 487c2f8676e..3dc491e0895 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 16735b2e8c7..bf468b695b5 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 33c48a7e176..c955c091cd3 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 9ca06821d84..b246eab3dc0 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 c69a1c59cff..c65f542bb07 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 b71df547639..73efc4d5982 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 c46bdf413fa..5ac401613f8 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 3889171585a..93a45846851 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 fde636f70cc..e10614cdc87 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 8472a23f4c2..5c52150eb6c 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 fda25a09abb..29e1b863b57 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 69e94860864..2da3494758b 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 fb2d4e66d2a..d06ff7397a7 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 55eb23a9c6c..72d772ff110 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 85352b281b1..59a4fe8307d 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 71ff45da1c4..44bef2d76d0 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 89bc65545be..b5657c92f80 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 0f705a8a3da..bf7940b335c 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 fd91b8ccfa6..aef4905cdd3 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 a6c0eed7630..47382823127 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 da0888d8d6e..0b6674db4ee 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 6fddd9c5c01..0668c3da5c1 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 487c2f8676e..3dc491e0895 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 ea63d87ad88..8734158532f 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 e39858e618c..236c6f09663 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 82668c54142..18776eca0e9 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 f1036a6cb10..df19074bf15 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 84ef8339590..01d6f070e68 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 1db65d5fed9..5a1dd5b3bee 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 974c21c806a..69a2a5ddd69 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 dfaac9cd68e..02e11174147 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 fa4793c0f10..2a37fb6080e 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 b4b3a1236de..29e5c84f77f 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 0cf374d85b4..75cb079a80a 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 e7fe4f4eacd..a5baebbf223 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 be197115b70..a8f1263085f 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 0df600db6ad..b981a913a03 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 e4d7a25bbc7..cb5354810a8 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 c3996d4a048..beb13c04220 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 4a1036176bc..95acb647cfc 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 fcfc7038806..b12ec06125b 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 e9bdb89f26d..20900abc1a7 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 23297a12c0b..66538535a97 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 9819cbc3592..1a3eaa8b6be 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 efe4635fc63..99ce730532c 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 c6f80e2623c..ae7ed744d6f 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 63a516578b5..d49328faace 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 72577839346..a792be6c4d8 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 59f0d192059..575f39a99b5 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 579a914d6a4..37f3ee38216 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 d4b1f6ccc5e..f6f0cac798f 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 7b0f6438356..b2e3ba42708 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 83d6ad7af94..f29b8155be7 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 81bca41da41..12ab7eb4afe 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 7b03beea497..6ffa416ea0a 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 37076f501ad..d0a9c80e1cb 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 a056fd8f872..67f161af681 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 ac099665639..88898e2c028 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 34a708dfe54..0a998a382b4 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 ee739f0497a..865f72e6843 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 a40af5a184a..1e1d6853c86 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 fb85863a11d..d3a3b422451 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 6aa5fa99017..d86cabf63ba 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 4ce30022dac..8b9ce2f859a 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 64d27c0d23c..75337c018b8 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 bb81f630bfc..d7f058db6a7 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 01c336df46c..1ab9016fa06 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):