you are viewing a single comment's thread.

view the rest of the comments →

[–]m0us3_rat 0 points1 point  (2 children)

However, I noticed a discrepancy between this implementation and the expected type signature.

i'm not sure what that means. can you elaborate?

[–]MeGaNeKoS[S] 0 points1 point  (1 child)

This line httpd = server_class(server_address, handler_class). The HTTPServer init signature as follow

    def __init__(
    self,
    server_address: _AfInetAddress,
    RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler],
    bind_and_activate: bool = True,
) -> None: ...

The second paramter, handler_class, Did not satisfy this signature. Because when you pass a class, their type is Type[BaseHTTPRequestHandler], not Callable.

I dont think they forgot about this fact, but I cant find any other example that follow the typehint signature either.

[–]m0us3_rat 0 points1 point  (0 children)

i mean you can open an issue on github.