Skip to content

Commit

Permalink
prevent overwriting user-API methods (#2425)
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry authored Sep 6, 2023
1 parent acf85f2 commit 07eab43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jdaviz/core/user_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def __setattr__(self, attr, value):
raise AttributeError("cannot set read-only item")

exp_obj = getattr(self._obj, attr)
if hasattr(exp_obj, '__call__'):
raise AttributeError(f"{attr} is a callable, cannot set to a value. See help({attr}) for input arguments.") # noqa
from jdaviz.core.template_mixin import (SelectPluginComponent,
UnitSelectPluginComponent,
PlotOptionsSyncState,
Expand Down

0 comments on commit 07eab43

Please sign in to comment.