mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 04:11:28 +08:00
Use typing_extensions.Self instead of _typeshed.Self (#9702)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class Key:
|
||||
# Enable when we can use stubs from installed dependencies,
|
||||
@@ -8,7 +8,7 @@ class Key:
|
||||
def __init__(self, key, algorithm) -> None: ...
|
||||
def sign(self, msg: bytes) -> bytes: ...
|
||||
def verify(self, msg: bytes, sig: bytes) -> bool: ...
|
||||
def public_key(self: Self) -> Self: ...
|
||||
def public_key(self) -> Self: ...
|
||||
def to_pem(self) -> bytes: ...
|
||||
def to_dict(self) -> dict[str, Any]: ...
|
||||
def encrypt(self, plain_text: str | bytes, aad: bytes | None = ...) -> tuple[bytes, bytes, bytes | None]: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable
|
||||
from hashlib import _Hash
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from .base import Key
|
||||
|
||||
@@ -20,6 +20,6 @@ class ECDSAECKey(Key):
|
||||
def sign(self, msg): ...
|
||||
def verify(self, msg, sig): ...
|
||||
def is_public(self) -> bool: ...
|
||||
def public_key(self: Self) -> Self: ...
|
||||
def public_key(self) -> Self: ...
|
||||
def to_pem(self): ...
|
||||
def to_dict(self) -> dict[str, Any]: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from .base import Key
|
||||
|
||||
@@ -20,7 +20,7 @@ class RSAKey(Key):
|
||||
def sign(self, msg: bytes) -> bytes: ...
|
||||
def verify(self, msg: bytes, sig: bytes) -> bool: ...
|
||||
def is_public(self) -> bool: ...
|
||||
def public_key(self: Self) -> Self: ...
|
||||
def public_key(self) -> Self: ...
|
||||
def to_pem(self, pem_format: str = ...) -> bytes: ...
|
||||
def to_dict(self) -> dict[str, Any]: ...
|
||||
def wrap_key(self, key_data: bytes) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user