We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ed80ca commit 88b784eCopy full SHA for 88b784e
packages/textual-hmr/textual_hmr.py
@@ -181,9 +181,7 @@ def on_changes(self, files: set[Path]):
181
last_return = None
182
last_return_code = 0
183
184
- reloader = Reloader()
185
- await reloader.__aenter__()
186
- try:
+ async with Reloader() as reloader:
187
while need_restart:
188
need_restart = False
189
with reloader.error_filter:
@@ -196,8 +194,6 @@ def on_changes(self, files: set[Path]):
196
194
finally:
197
195
main_loop_started.clear()
198
current_app = None
199
- finally:
200
- await reloader.__aexit__(None, None, None)
201
202
return last_return, last_return_code
203
0 commit comments