File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,12 @@ class Renderer(Generic[IT]):
137
137
asynchonously.
138
138
"""
139
139
140
+ # Set _session here because some subclasses of Renderer (e.g. data_frame) set
141
+ # self._session before calling super().__init__(). If we were to set
142
+ # self._session=None in the __init__ method here, it would overwrite the value from
143
+ # the subclass. We avoid that by setting it here.
144
+ _session : Session | None = None
145
+
140
146
def __call__ (self , _fn : ValueFn [IT ]) -> Self :
141
147
"""
142
148
Add the value function to the renderer.
@@ -217,7 +223,6 @@ def __init__(
217
223
super ().__init__ ()
218
224
219
225
self ._auto_registered : bool = False
220
- self ._session : Session | None = None
221
226
222
227
# Must be done last
223
228
if callable (_fn ):
You can’t perform that action at this time.
0 commit comments