Some minor fixes (#4930)

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
Ivan Levkivskyi
2021-01-12 13:40:59 +00:00
committed by GitHub
parent c5ed22a24e
commit 1feccfc54a
2 changed files with 6 additions and 4 deletions

View File

@@ -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: ...

View File

@@ -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