summaryrefslogtreecommitdiff
path: root/SCons/Tool/ninja/ninja_scons_daemon.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2023-05-03 18:29:26 -0700
committerGitHub <noreply@github.com>2023-05-03 18:29:26 -0700
commit239f437b463dc948690473830f1816e9a67b72c2 (patch)
tree203b499babac9dbed56afbd1e1eea548ac1b9932 /SCons/Tool/ninja/ninja_scons_daemon.py
parent6ce33bdadec1cf558a6d0df27a6a083516d6cf23 (diff)
parent5717e06c245d99923f5c4a6e786a564799871c49 (diff)
downloadscons-git-239f437b463dc948690473830f1816e9a67b72c2.tar.gz
Merge branch 'master' into maint/validateOptions
Diffstat (limited to 'SCons/Tool/ninja/ninja_scons_daemon.py')
-rw-r--r--SCons/Tool/ninja/ninja_scons_daemon.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/SCons/Tool/ninja/ninja_scons_daemon.py b/SCons/Tool/ninja/ninja_scons_daemon.py
index 6802af293..2084097fc 100644
--- a/SCons/Tool/ninja/ninja_scons_daemon.py
+++ b/SCons/Tool/ninja/ninja_scons_daemon.py
@@ -77,11 +77,11 @@ logging.basicConfig(
)
-def daemon_log(message):
+def daemon_log(message) -> None:
logging.debug(message)
-def custom_readlines(handle, line_separator="\n", chunk_size=1):
+def custom_readlines(handle, line_separator: str="\n", chunk_size: int=1):
buf = ""
while not handle.closed:
data = handle.read(chunk_size)
@@ -98,7 +98,7 @@ def custom_readlines(handle, line_separator="\n", chunk_size=1):
buf = ""
-def custom_readerr(handle, line_separator="\n", chunk_size=1):
+def custom_readerr(handle, line_separator: str="\n", chunk_size: int=1):
buf = ""
while not handle.closed:
data = handle.read(chunk_size)
@@ -112,13 +112,13 @@ def custom_readerr(handle, line_separator="\n", chunk_size=1):
yield chunk + line_separator
-def enqueue_output(out, queue):
+def enqueue_output(out, queue) -> None:
for line in iter(custom_readlines(out)):
queue.put(line)
out.close()
-def enqueue_error(err, queue):
+def enqueue_error(err, queue) -> None:
for line in iter(custom_readerr(err)):
queue.put(line)
err.close()
@@ -143,7 +143,7 @@ class StateInfo:
shared_state = StateInfo()
-def sigint_func(signum, frame):
+def sigint_func(signum, frame) -> None:
global shared_state
shared_state.daemon_needs_to_shutdown = True
@@ -264,7 +264,7 @@ logging.debug(
keep_alive_timer = timer()
-def server_thread_func():
+def server_thread_func() -> None:
global shared_state
class S(http.server.BaseHTTPRequestHandler):
def do_GET(self):
@@ -284,7 +284,7 @@ def server_thread_func():
daemon_log(f"Got request: {build[0]}")
input_q.put(build[0])
- def pred():
+ def pred() -> bool:
return build[0] in shared_state.finished_building
with building_cv:
@@ -329,7 +329,7 @@ def server_thread_func():
daemon_log("SERVER ERROR: " + traceback.format_exc())
raise
- def log_message(self, format, *args):
+ def log_message(self, format, *args) -> None:
return
socketserver.TCPServer.allow_reuse_address = True