]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fix CertTypes (#1503)
authorMarat Sharafutdinov <decaz89@gmail.com>
Wed, 10 Mar 2021 09:49:37 +0000 (12:49 +0300)
committerGitHub <noreply@github.com>
Wed, 10 Mar 2021 09:49:37 +0000 (09:49 +0000)
httpx/_types.py

index 7768bac11b97c4fe72206f93c71254f2a707be36..385f89ddb9024b71d5d847f58ed5fdeb966e8371 100644 (file)
@@ -51,7 +51,14 @@ HeaderTypes = Union[
 
 CookieTypes = Union["Cookies", CookieJar, Dict[str, str], List[Tuple[str, str]]]
 
-CertTypes = Union[str, Tuple[str, str], Tuple[str, str, str]]
+CertTypes = Union[
+    # certfile
+    str,
+    # (certfile, keyfile)
+    Tuple[str, Optional[str]],
+    # (certfile, keyfile, password)
+    Tuple[str, Optional[str], Optional[str]],
+]
 VerifyTypes = Union[str, bool, ssl.SSLContext]
 TimeoutTypes = Union[
     Optional[float],