MCPcopy Index your code
hub / github.com/plotly/dash / set_read_only

Method set_read_only

dash/_utils.py:96–107  ·  view source on GitHub ↗

Designate named attributes as read-only with the corresponding msg Method is additive. Making additional calls to this method will update existing messages and add to the current set of _read_only names.

(self, names, msg="Attribute is read-only")

Source from the content-addressed store, hash-verified

94 raise AttributeError(key)
95
96 def set_read_only(self, names, msg="Attribute is read-only"):
97 """
98 Designate named attributes as read-only with the corresponding msg
99
100 Method is additive. Making additional calls to this method will update
101 existing messages and add to the current set of _read_only names.
102 """
103 new_read_only = {name: msg for name in names}
104 if getattr(self, "_read_only", False):
105 self._read_only.update(new_read_only)
106 else:
107 object.__setattr__(self, "_read_only", new_read_only)
108
109 def unset_read_only(self, keys):
110 if hasattr(self, "_read_only"):

Callers 3

__init__Method · 0.80
init_appMethod · 0.80

Calls 2

updateMethod · 0.45
__setattr__Method · 0.45

Tested by 1