Skip to content

Commit 852b8c3

Browse files
committed
fix class wrapper
1 parent 4a5d39a commit 852b8c3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cf_xarray/accessor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def wrapper(*args, **kwargs):
5555

5656

5757
class _CFWrappedClass:
58-
def __init__(self, obj: Union[DataArray, Dataset], towrap, accessor: "CFAccessor"):
58+
def __init__(self, towrap, accessor: "CFAccessor"):
5959
"""
6060
6161
Parameters
@@ -66,15 +66,14 @@ def __init__(self, obj: Union[DataArray, Dataset], towrap, accessor: "CFAccessor
6666
Instance of xarray class that is being wrapped.
6767
accessor : CFAccessor
6868
"""
69-
self._obj = obj
7069
self.wrapped = towrap
7170
self.accessor = accessor
7271

7372
def __repr__(self):
7473
return "--- CF-xarray wrapped \n" + repr(self.wrapped)
7574

7675
def __getattr__(self, attr):
77-
return _getattr(obj=self._obj, attr=attr, accessor=self.accessor)
76+
return _getattr(obj=self.wrapped, attr=attr, accessor=self.accessor)
7877

7978

8079
class _CFWrappedPlotMethods:

0 commit comments

Comments
 (0)