mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
Reduce use of deprecated typing aliases (#6358)
This commit is contained in:
@@ -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] = ...
|
||||
|
||||
Reference in New Issue
Block a user