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

[tests] utils: refactor type-hint signatures. #12144

Prev Previous commit
Next Next commit
[tests] utils: make http_server 'tls_enabled' parameter keyword-only.
Co-authored-by: Bénédikt Tran <[email protected]>
  • Loading branch information
jayaddison and picnixz committed Mar 20, 2024
commit 643cfb0fb111db45b3b640fc5b3a6ae7d02b4cf9
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(


@contextmanager
def http_server(handler: type[BaseRequestHandler], tls_enabled: bool = False) -> Iterator[HttpServerThread]:
def http_server(handler: type[BaseRequestHandler], *, tls_enabled: bool = False) -> Iterator[HttpServerThread]:
server_cls = HttpsServerThread if tls_enabled else HttpServerThread
with filelock.FileLock(LOCK_PATH):
server = server_cls(handler, daemon=True)
Expand Down
Loading