From 063a2048d1584ff6a74bbd4fa0ae4d9184bcab9b Mon Sep 17 00:00:00 2001 From: Mathias Ertl Date: Thu, 22 Apr 2021 16:00:43 +0200 Subject: [PATCH] add typehints to OCSPRequestBuilder() (#5994) --- src/cryptography/x509/ocsp.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cryptography/x509/ocsp.py b/src/cryptography/x509/ocsp.py index 1c5de73e4..905ae745a 100644 --- a/src/cryptography/x509/ocsp.py +++ b/src/cryptography/x509/ocsp.py @@ -312,7 +312,15 @@ class OCSPResponse(metaclass=abc.ABCMeta): class OCSPRequestBuilder(object): - def __init__(self, request=None, extensions=[]): + def __init__( + self, + request: typing.Optional[ + typing.Tuple[ + x509.Certificate, x509.Certificate, hashes.HashAlgorithm + ] + ] = None, + extensions: typing.List[x509.Extension[x509.ExtensionType]] = [], + ) -> None: self._request = request self._extensions = extensions