Reduce use of deprecated typing aliases (#6358)

This commit is contained in:
Alex Waygood
2021-11-23 09:56:43 +00:00
committed by GitHub
parent 7e836db2f3
commit c685c2d6c6
19 changed files with 64 additions and 61 deletions

View File

@@ -1,5 +1,3 @@
from typing import FrozenSet
from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm, CipherAlgorithm
from cryptography.hazmat.primitives.ciphers.modes import ModeWithNonce
@@ -7,7 +5,7 @@ class AES(BlockCipherAlgorithm, CipherAlgorithm):
def __init__(self, key: bytes) -> None: ...
block_size: int = ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
@property
def key_size(self) -> int: ...
@@ -16,7 +14,7 @@ class ARC4(CipherAlgorithm):
@property
def key_size(self) -> int: ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
class Blowfish(BlockCipherAlgorithm, CipherAlgorithm):
def __init__(self, key: bytes) -> None: ...
@@ -24,7 +22,7 @@ class Blowfish(BlockCipherAlgorithm, CipherAlgorithm):
def key_size(self) -> int: ...
block_size: int = ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
class Camellia(BlockCipherAlgorithm, CipherAlgorithm):
def __init__(self, key: bytes) -> None: ...
@@ -32,7 +30,7 @@ class Camellia(BlockCipherAlgorithm, CipherAlgorithm):
def key_size(self) -> int: ...
block_size: int = ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
class CAST5(BlockCipherAlgorithm, CipherAlgorithm):
def __init__(self, key: bytes) -> None: ...
@@ -40,14 +38,14 @@ class CAST5(BlockCipherAlgorithm, CipherAlgorithm):
def key_size(self) -> int: ...
block_size: int = ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
class ChaCha20(CipherAlgorithm, ModeWithNonce):
def __init__(self, key: bytes, nonce: bytes) -> None: ...
@property
def key_size(self) -> int: ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
@property
def nonce(self) -> bytes: ...
@@ -57,7 +55,7 @@ class IDEA(CipherAlgorithm):
def key_size(self) -> int: ...
block_size: int = ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
class SEED(BlockCipherAlgorithm, CipherAlgorithm):
def __init__(self, key: bytes) -> None: ...
@@ -65,7 +63,7 @@ class SEED(BlockCipherAlgorithm, CipherAlgorithm):
def key_size(self) -> int: ...
block_size: int = ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...
class TripleDES(BlockCipherAlgorithm, CipherAlgorithm):
def __init__(self, key: bytes) -> None: ...
@@ -73,4 +71,4 @@ class TripleDES(BlockCipherAlgorithm, CipherAlgorithm):
def key_size(self) -> int: ...
block_size: int = ...
name: str = ...
key_sizes: FrozenSet[int] = ...
key_sizes: frozenset[int] = ...