From 7b382142807b9d8484ee51d482db2d36b1880bea Mon Sep 17 00:00:00 2001 From: Jaromir Latal Date: Sat, 22 Feb 2020 04:49:04 +0000 Subject: [PATCH] cryptography: Make `mode` in `Cipher.__init__` optional (#3751) --- .../2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi b/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi index 547a288d8..321ecbc1b 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi @@ -1,4 +1,5 @@ from abc import ABCMeta, abstractmethod +from typing import Optional from cryptography.hazmat.backends.interfaces import CipherBackend from cryptography.hazmat.primitives.ciphers.modes import Mode @@ -22,7 +23,7 @@ class BlockCipherAlgorithm(metaclass=ABCMeta): def block_size(self) -> int: ... class Cipher(object): - def __init__(self, algorithm: CipherAlgorithm, mode: Mode, backend: CipherBackend) -> None: ... + def __init__(self, algorithm: CipherAlgorithm, mode: Optional[Mode], backend: CipherBackend) -> None: ... def decryptor(self) -> CipherContext: ... def encryptor(self) -> CipherContext: ...