Skip to content

Commit b8a9681

Browse files
committed
Use Literal in save_pkcs1()
1 parent d35d90e commit b8a9681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_rsa/key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def _assert_format_exists(
130130
"Unsupported format: %r, try one of %s" % (file_format, formats)
131131
) from err
132132

133-
def save_pkcs1(self, format: str = "PEM") -> bytes:
133+
def save_pkcs1(self, format: Literal["PEM", "DER"] = "PEM") -> bytes:
134134
"""Saves the key in PKCS#1 DER or PEM format.
135135
136136
:param str format: the format to save; 'PEM' or 'DER'

0 commit comments

Comments
 (0)