Skip to content

Commit

Permalink
fix: Fix typing of log_request (#166)
Browse files Browse the repository at this point in the history
This mistake slipped through because we are not yet validating every PR with mypy.
  • Loading branch information
joeyparrish authored Oct 24, 2024
1 parent aa1f4e7 commit c38d7e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions streamer/proxy_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c38d7e9

Please sign in to comment.