diff --git a/fastcore/transform.py b/fastcore/transform.py index b590231e..3f307e32 100644 --- a/fastcore/transform.py +++ b/fastcore/transform.py @@ -202,12 +202,12 @@ def __setstate__(self,data): self.__dict__.update(data) def __getattr__(self,k): return gather_attrs(self, k, 'fs') def __dir__(self): return super().__dir__() + gather_attr_names(self, 'fs') - def decode (self, o, full=True): - if full: return compose_tfms(o, tfms=self.fs, is_enc=False, reverse=True, split_idx=self.split_idx) + def decode (self, o, full=True, **kwargs): + if full: return compose_tfms(o, tfms=self.fs, is_enc=False, reverse=True, split_idx=self.split_idx, **kwargs) #Not full means we decode up to the point the item knows how to show itself. for f in reversed(self.fs): if self._is_showable(o): return o - o = f.decode(o, split_idx=self.split_idx) + o = f.decode(o, split_idx=self.split_idx, **kwargs) return o def show(self, o, ctx=None, **kwargs): diff --git a/nbs/05_transform.ipynb b/nbs/05_transform.ipynb index 0aff6a27..1247056d 100644 --- a/nbs/05_transform.ipynb +++ b/nbs/05_transform.ipynb @@ -1230,12 +1230,12 @@ " def __getattr__(self,k): return gather_attrs(self, k, 'fs')\n", " def __dir__(self): return super().__dir__() + gather_attr_names(self, 'fs')\n", "\n", - " def decode (self, o, full=True):\n", - " if full: return compose_tfms(o, tfms=self.fs, is_enc=False, reverse=True, split_idx=self.split_idx)\n", + " def decode (self, o, full=True, **kwargs):\n", + " if full: return compose_tfms(o, tfms=self.fs, is_enc=False, reverse=True, split_idx=self.split_idx, **kwargs)\n", " #Not full means we decode up to the point the item knows how to show itself.\n", " for f in reversed(self.fs):\n", " if self._is_showable(o): return o\n", - " o = f.decode(o, split_idx=self.split_idx)\n", + " o = f.decode(o, split_idx=self.split_idx, **kwargs)\n", " return o\n", "\n", " def show(self, o, ctx=None, **kwargs):\n",