Remove unnecessary handling of value attribute.
PiperOrigin-RevId: 788060431 Change-Id: I56acafb211441bd74dbd6e80ab1d8f82ac808c3a
This commit is contained in:
committed by
Copybara-Service
parent
9e7979e492
commit
a116653e5f
@@ -1139,11 +1139,6 @@ class Data(PyTreeNode):
|
|||||||
}[type(self._impl)]
|
}[type(self._impl)]
|
||||||
|
|
||||||
def __getattr__(self, name: str):
|
def __getattr__(self, name: str):
|
||||||
if name == 'value':
|
|
||||||
# Special case for NNX, the value attribute may not exist on the parent
|
|
||||||
# PyTreeNode, before it exists on the child PyTreeNode. Thanks NNX.
|
|
||||||
return object.__getattribute__(self, 'value')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
impl_instsance = object.__getattribute__(self, '_impl')
|
impl_instsance = object.__getattribute__(self, '_impl')
|
||||||
val = getattr(impl_instsance, name)
|
val = getattr(impl_instsance, name)
|
||||||
|
|||||||
Reference in New Issue
Block a user