Skip to content

Commit

Permalink
Add PathLike[str] type hint for ssl_keyfile (#2481)
Browse files Browse the repository at this point in the history
* Fix typing for ssl_keyfile field to allow PathLike types

* Fix test

---------

Co-authored-by: Marcelo Trylesinski <[email protected]>
  • Loading branch information
FirelightFlagboy and Kludex authored Oct 9, 2024
1 parent 1ddd250 commit 27d976a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uvicorn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def __init__(
timeout_notify: int = 30,
timeout_graceful_shutdown: int | None = None,
callback_notify: Callable[..., Awaitable[None]] | None = None,
ssl_keyfile: str | None = None,
ssl_keyfile: str | os.PathLike[str] | None = None,
ssl_certfile: str | os.PathLike[str] | None = None,
ssl_keyfile_password: str | None = None,
ssl_version: int = SSL_PROTOCOL_VERSION,
Expand Down
2 changes: 1 addition & 1 deletion uvicorn/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def run(
limit_max_requests: int | None = None,
timeout_keep_alive: int = 5,
timeout_graceful_shutdown: int | None = None,
ssl_keyfile: str | None = None,
ssl_keyfile: str | os.PathLike[str] | None = None,
ssl_certfile: str | os.PathLike[str] | None = None,
ssl_keyfile_password: str | None = None,
ssl_version: int = SSL_PROTOCOL_VERSION,
Expand Down

0 comments on commit 27d976a

Please sign in to comment.