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

Class DefaultsBackwardsCompatible

plotly/io/_kaleido.py:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 # DefaultsBackwardsCompatible sets the attributes on `scope` object at the same time
121 # as they are set on the `defaults` object
122 class DefaultsBackwardsCompatible(defaults.__class__):
123 def __init__(self, scope):
124 self._scope = scope
125 super().__init__()
126
127 def __setattr__(self, name, value):
128 if not name == "_scope":
129 if (
130 hasattr(self._scope, name)
131 and getattr(self._scope, name) != value
132 ):
133 setattr(self._scope, name, value)
134 super().__setattr__(name, value)
135
136 scope = PlotlyScopeWrapper()
137 defaults = DefaultsBackwardsCompatible(scope)

Callers 1

_kaleido.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected