Skip to content

Commit 8ba4777

Browse files
committed
Fix type errors
1 parent 3e9a1fb commit 8ba4777

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/reactpy_django/utils.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,13 @@ class SyncLayout(Layout):
355355
def __enter__(self):
356356
self.loop = asyncio.new_event_loop()
357357
self.thread = ThreadPoolExecutor(max_workers=1)
358-
return self.thread.submit(self.loop.run_until_complete, self.__aenter__()).result()
358+
self.thread.submit(self.loop.run_until_complete, self.__aenter__()).result()
359+
return self
359360

360-
def __exit__(self, *exec):
361-
result = self.thread.submit(self.loop.run_until_complete, self.__aexit__(*exec)).result()
361+
def __exit__(self, exc_type, exc_val, exc_tb):
362+
self.thread.submit(self.loop.run_until_complete, self.__aexit__()).result()
362363
self.loop.close()
363364
self.thread.shutdown()
364-
return result
365365

366366
def sync_render(self):
367367
return self.thread.submit(self.loop.run_until_complete, self.render()).result()

0 commit comments

Comments
 (0)