From 53a3b92dfc8ed7243434b7faf44463dd94e5c35c Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 24 Oct 2024 13:51:00 -0700 Subject: [PATCH] fix: Fix typing of log_request This mistake slipped through because we are not yet validating every PR with mypy. --- streamer/proxy_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamer/proxy_node.py b/streamer/proxy_node.py index dbaeec5..55d51ed 100644 --- a/streamer/proxy_node.py +++ b/streamer/proxy_node.py @@ -21,7 +21,7 @@ import urllib.parse from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler -from typing import Any, BinaryIO, Optional +from typing import Any, BinaryIO, Optional, Union from streamer.node_base import ProcessStatus, ThreadedNodeBase @@ -108,7 +108,7 @@ def __init__(self, rate_limiter: RateLimiter, *args, **kwargs): # NOTE: The default values here for log_request are taken from the base # class, and not a design decision of ours. - def log_request(self, code: str = '-', size: str = '-') -> None: + def log_request(self, code: Union[int, str] = '-', size: Union[int, str] = '-') -> None: """Override the request logging feature of the Python HTTP server.""" try: code_int = int(code)