Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSkovMadsen committed Nov 11, 2023
1 parent 4c3ad28 commit e35f6a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions panel/pane/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
from bokeh.model import Model
from pyviz_comms import Comm

def _should_inherit(self, p, v):
def _clone_should_inherit(self, p, v):
_p = self.param[p]
return not _p.readonly and v is not _p.default and (v is not None or _p.allow_None)
return v is not _p.default and not _p.readonly and (v is not None or _p.allow_None)

def panel(obj: Any, **kwargs) -> Viewable:
"""
Expand Down Expand Up @@ -386,7 +386,7 @@ def clone(self: T, object: Optional[Any] = None, **params) -> T:
Cloned Pane object
"""
inherited = {
p: v for p, v in self.param.values().items() if _should_inherit(self, p, v)
p: v for p, v in self.param.values().items() if _clone_should_inherit(self, p, v)
}
params = dict(inherited, **params)
old_object = params.pop('object', None)
Expand Down

0 comments on commit e35f6a6

Please sign in to comment.