Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,6 +1,6 @@
import sys
from _typeshed import ReadableBuffer
from typing import AbstractSet, Optional
from typing import AbstractSet
class _Hash(object):
digest_size: int
@@ -47,7 +47,7 @@ algorithms_guaranteed: AbstractSet[str]
algorithms_available: AbstractSet[str]
def pbkdf2_hmac(
hash_name: str, password: ReadableBuffer, salt: ReadableBuffer, iterations: int, dklen: Optional[int] = ...
hash_name: str, password: ReadableBuffer, salt: ReadableBuffer, iterations: int, dklen: int | None = ...
) -> bytes: ...
class _VarLenHash(object):
@@ -70,10 +70,10 @@ shake_256 = _VarLenHash
def scrypt(
password: ReadableBuffer,
*,
salt: Optional[ReadableBuffer] = ...,
n: Optional[int] = ...,
r: Optional[int] = ...,
p: Optional[int] = ...,
salt: ReadableBuffer | None = ...,
n: int | None = ...,
r: int | None = ...,
p: int | None = ...,
maxmem: int = ...,
dklen: int = ...,
) -> bytes: ...