Skip to content

Commit

Permalink
Improved parameter comparison logic
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 18, 2019
1 parent d8dda44 commit e45cb28
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions panel/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,13 @@ def param_reprs(parameterized, skip=None):
cls = type(parameterized).__name__
param_reprs = []
for p, v in sorted(parameterized.get_param_values()):
try:
equal = v == parameterized.param[p].default
except:
equal = False
default = parameterized.param[p].default
equal = v is default
if not equal:
try:
equal = bool(v==default)
except:
equal = False

if equal: continue
elif v is None: continue
Expand Down

0 comments on commit e45cb28

Please sign in to comment.