Skip to content

Commit 27d976a

Browse files
Add PathLike[str] type hint for ssl_keyfile (#2481)
* Fix typing for ssl_keyfile field to allow PathLike types * Fix test --------- Co-authored-by: Marcelo Trylesinski <[email protected]>
1 parent 1ddd250 commit 27d976a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

uvicorn/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def __init__(
213213
timeout_notify: int = 30,
214214
timeout_graceful_shutdown: int | None = None,
215215
callback_notify: Callable[..., Awaitable[None]] | None = None,
216-
ssl_keyfile: str | None = None,
216+
ssl_keyfile: str | os.PathLike[str] | None = None,
217217
ssl_certfile: str | os.PathLike[str] | None = None,
218218
ssl_keyfile_password: str | None = None,
219219
ssl_version: int = SSL_PROTOCOL_VERSION,

uvicorn/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def run(
497497
limit_max_requests: int | None = None,
498498
timeout_keep_alive: int = 5,
499499
timeout_graceful_shutdown: int | None = None,
500-
ssl_keyfile: str | None = None,
500+
ssl_keyfile: str | os.PathLike[str] | None = None,
501501
ssl_certfile: str | os.PathLike[str] | None = None,
502502
ssl_keyfile_password: str | None = None,
503503
ssl_version: int = SSL_PROTOCOL_VERSION,

0 commit comments

Comments
 (0)