Use lowercase tuple where possible (#6170)

This commit is contained in:
Akuli
2021-10-15 00:18:19 +00:00
committed by GitHub
parent 5f386b0575
commit 994b69ef8f
242 changed files with 1212 additions and 1224 deletions

View File

@@ -1,5 +1,4 @@
from abc import ABCMeta, abstractmethod
from typing import Tuple
from cryptography.hazmat.backends.interfaces import RSABackend
from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext
@@ -52,7 +51,7 @@ def generate_private_key(
def rsa_crt_iqmp(p: int, q: int) -> int: ...
def rsa_crt_dmp1(private_exponent: int, p: int) -> int: ...
def rsa_crt_dmq1(private_exponent: int, q: int) -> int: ...
def rsa_recover_prime_factors(n: int, e: int, d: int) -> Tuple[int, int]: ...
def rsa_recover_prime_factors(n: int, e: int, d: int) -> tuple[int, int]: ...
class RSAPrivateNumbers(object):
def __init__(self, p: int, q: int, d: int, dmp1: int, dmq1: int, iqmp: int, public_numbers: RSAPublicNumbers) -> None: ...

View File

@@ -1,8 +1,6 @@
from typing import Tuple
from cryptography.hazmat.primitives.hashes import HashAlgorithm
def decode_dss_signature(signature: bytes) -> Tuple[int, int]: ...
def decode_dss_signature(signature: bytes) -> tuple[int, int]: ...
def encode_dss_signature(r: int, s: int) -> bytes: ...
class Prehashed(object):

View File

@@ -1,4 +1,4 @@
from typing import Any, Tuple
from typing import Any
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKeyWithSerialization
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKeyWithSerialization
@@ -8,7 +8,7 @@ from cryptography.x509 import Certificate
def load_key_and_certificates(
data: bytes, password: bytes | None, backend: Any | None = ...
) -> Tuple[Any | None, Certificate | None, list[Certificate]]: ...
) -> tuple[Any | None, Certificate | None, list[Certificate]]: ...
def serialize_key_and_certificates(
name: bytes,
key: RSAPrivateKeyWithSerialization | EllipticCurvePrivateKeyWithSerialization | DSAPrivateKeyWithSerialization,