Skip to content

Commit 68f4864

Browse files
authored
jwcrypto: Fix export_to_pem password argument (#14037)
1 parent 64875ee commit 68f4864

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stubs/jwcrypto/jwcrypto/jwk.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from _typeshed import Unused
12
from collections.abc import Callable, Sequence
23
from enum import Enum
34
from typing import Any, Literal, NamedTuple, TypeVar, overload
@@ -201,7 +202,10 @@ class JWK(dict[str, Any]):
201202
),
202203
) -> None: ...
203204
def import_from_pem(self, data: bytes, password: bytes | None = None, kid: str | None = None) -> None: ...
204-
def export_to_pem(self, private_key: bool = False, password: bool = False) -> bytes: ...
205+
@overload
206+
def export_to_pem(self, private_key: Literal[False] = False, password: Unused = False) -> bytes: ...
207+
@overload
208+
def export_to_pem(self, private_key: Literal[True], password: bytes | None) -> bytes: ...
205209
@classmethod
206210
def from_pyca(
207211
cls,

0 commit comments

Comments
 (0)