fix mypy error

src/extract_otp_secrets.py:707: error: Argument 1 to "save" of "PyPNGImage" has incompatible type "str"; expected "SupportsWrite[bytes]"  [arg-type]
This commit is contained in:
scito
2025-02-08 09:12:45 +01:00
parent 38e7e8b40b
commit 10a60ab556
2 changed files with 7 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ from typing import (Any, Final, List, Optional, Sequence, TextIO, Tuple,
TypedDict, Union)
import colorama
from qrcode import QRCode # type: ignore
from qrcode import QRCode
import protobuf_generated_python.google_auth_pb2 as pb
@@ -704,7 +704,7 @@ def save_qr_image_file(otp_url: OtpUrl, name: str) -> None:
qr.add_data(otp_url)
img = qr.make_image(fill_color='black', back_color='white')
if verbose: print(f"Saving to {name}")
img.save(name)
img.save(name) # type: ignore
def print_qr(otp_url: str, out: Optional[TextIO] = None) -> None: