Skip to content

Commit

Permalink
Loosen callback future type (#6120)
Browse files Browse the repository at this point in the history
* Loosen callback future type

* Set as attr
  • Loading branch information
ahuang11 authored Dec 22, 2023
1 parent 07414e9 commit b45b07a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions panel/chat/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ class ChatFeed(ListPanel):
The placeholder wrapped in a ChatMessage object;
primarily to prevent recursion error in _update_placeholder.""")

_callback_future = param.ClassSelector(class_=asyncio.Future, allow_None=True, doc="""
The current, cancellable async task being executed.""")

_callback_state = param.ObjectSelector(objects=list(CallbackState), doc="""
The current state of the callback.""")

Expand All @@ -217,6 +214,8 @@ class ChatFeed(ListPanel):
_stylesheets: ClassVar[List[str]] = [f"{CDN_DIST}css/chat_feed.css"]

def __init__(self, *objects, **params):
self._callback_future = None

if params.get("renderers") and not isinstance(params["renderers"], list):
params["renderers"] = [params["renderers"]]
if params.get("width") is None and params.get("sizing_mode") is None:
Expand Down

0 comments on commit b45b07a

Please sign in to comment.