Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix typing of log_request #166

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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