Merge pull request #2945 from hartikainen:instsance-typo
PiperOrigin-RevId: 855677085 Change-Id: Ifc1efc4163f1ef475b687436064026f0924841bf
This commit is contained in:
@@ -977,8 +977,8 @@ class Model(PyTreeNode):
|
|||||||
return object.__getattribute__(self, 'value')
|
return object.__getattribute__(self, 'value')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
impl_instsance = object.__getattribute__(self, '_impl')
|
impl_instance = object.__getattribute__(self, '_impl')
|
||||||
val = getattr(impl_instsance, name)
|
val = getattr(impl_instance, name)
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
f'Accessing `{name}` directly from `Model` is deprecated. '
|
f'Accessing `{name}` directly from `Model` is deprecated. '
|
||||||
f'Access it via `model._impl.{name}` instead.',
|
f'Access it via `model._impl.{name}` instead.',
|
||||||
@@ -1216,8 +1216,8 @@ class Data(PyTreeNode):
|
|||||||
|
|
||||||
def __getattr__(self, name: str):
|
def __getattr__(self, name: str):
|
||||||
try:
|
try:
|
||||||
impl_instsance = object.__getattribute__(self, '_impl')
|
impl_instance = object.__getattribute__(self, '_impl')
|
||||||
val = getattr(impl_instsance, name)
|
val = getattr(impl_instance, name)
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
f'Accessing `{name}` directly from `Data` is deprecated. '
|
f'Accessing `{name}` directly from `Data` is deprecated. '
|
||||||
f'Access it via `data._impl.{name}` instead.',
|
f'Access it via `data._impl.{name}` instead.',
|
||||||
|
|||||||
Reference in New Issue
Block a user