diff --git a/third_party/2and3/paramiko/pkey.pyi b/third_party/2and3/paramiko/pkey.pyi index 3cbe74a93..65a636d7d 100644 --- a/third_party/2and3/paramiko/pkey.pyi +++ b/third_party/2and3/paramiko/pkey.pyi @@ -1,4 +1,4 @@ -from typing import IO, Any, Optional, Pattern, Text, Union +from typing import IO, Any, Optional, Pattern, Text, Type, TypeVar, Union from paramiko.message import Message @@ -6,6 +6,8 @@ OPENSSH_AUTH_MAGIC: bytes = ... def _unpad_openssh(data: bytes) -> bytes: ... +_PK = TypeVar("_PK", bound=PKey) + class PKey: public_blob: Optional[PublicBlob] BEGIN_TAG: Pattern[str] @@ -22,9 +24,9 @@ class PKey: def sign_ssh_data(self, data: bytes) -> Message: ... def verify_ssh_sig(self, data: bytes, msg: Message) -> bool: ... @classmethod - def from_private_key_file(cls: Any, filename: str, password: Optional[str] = ...) -> PKey: ... + def from_private_key_file(cls: Type[_PK], filename: str, password: Optional[str] = ...) -> _PK: ... @classmethod - def from_private_key(cls, file_obj: IO[str], password: Optional[str] = ...) -> PKey: ... + def from_private_key(cls: Type[_PK], file_obj: IO[str], password: Optional[str] = ...) -> _PK: ... def write_private_key_file(self, filename: str, password: Optional[str] = ...) -> None: ... def write_private_key(self, file_obj: IO[str], password: Optional[str] = ...) -> None: ... def load_certificate(self, value: Union[Message, str]) -> None: ... diff --git a/third_party/2and3/polib.pyi b/third_party/2and3/polib.pyi index 267e47e22..4f5d0c992 100644 --- a/third_party/2and3/polib.pyi +++ b/third_party/2and3/polib.pyi @@ -69,7 +69,7 @@ class MOFile(_BaseFile): class _BaseEntry(object): msgid: Text msgstr: Text - msgid_plural: List[Text] + msgid_plural: Text msgstr_plural: List[Text] msgctxt: Text obsolete: bool