Type fixes for lazy_process.py

This commit is contained in:
John Chilton
2021-10-14 00:51:10 -04:00
parent 7c34dcabfb
commit 32cf97d78a
3 changed files with 2 additions and 2 deletions
+1
View File
@@ -30,6 +30,7 @@ class LazyProcess:
with self.thread_lock:
self.allow_process_request = False
if self.running:
assert self.process # tell type checker it can not be None if self.running
self.process.terminate()
time.sleep(.01)
if self.running:
-2
View File
@@ -32,8 +32,6 @@ check_untyped_defs = False
check_untyped_defs = False
[mypy-galaxy_test.base.ssh_util]
check_untyped_defs = False
[mypy-galaxy.util.lazy_process]
check_untyped_defs = False
[mypy-galaxy.util.heartbeat]
check_untyped_defs = False
[mypy-galaxy.tools.bundled.stats.aggregate_scores_in_intervals]
+1
View File
@@ -15,6 +15,7 @@ def test_lazy_process():
lazy_process.start_process()
while not os.path.exists(t.name):
time.sleep(.01)
assert lazy_process.process
assert lazy_process.process.poll() is None
lazy_process.shutdown()
ret_val = None