Fix/improve typing. (#905)

This commit is contained in:
Felix Fontein
2025-05-29 23:10:35 +02:00
committed by GitHub
parent b8adc3b241
commit 52b21b5177
4 changed files with 41 additions and 5 deletions

View File

@@ -403,6 +403,7 @@ class KeypairBackendOpensshBin(KeypairBackend):
)
def _update_comment(self) -> None:
assert self.comment is not None
try:
ssh_version = self._get_ssh_version() or "7.8"
force_new_format = (
@@ -527,6 +528,7 @@ class KeypairBackendCryptography(KeypairBackend):
return True
def _update_comment(self) -> None:
assert self.comment is not None
keypair = OpensshKeypair.load(
path=self.private_key_path, passphrase=self.passphrase, no_public_key=True
)