From 4f04cf1c18ee5e51a36a736bb002e6ee599baa75 Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Wed, 21 Sep 2022 17:07:11 +0000 Subject: [PATCH] Common: Fix mypy error in encoding.py --- monkey/common/credentials/encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/common/credentials/encoding.py b/monkey/common/credentials/encoding.py index e76ff8599..b5b58ec53 100644 --- a/monkey/common/credentials/encoding.py +++ b/monkey/common/credentials/encoding.py @@ -5,7 +5,7 @@ from typing import Optional, Union from pydantic import SecretBytes, SecretStr -def get_plaintext(secret: Union[SecretStr, SecretBytes, None, str]) -> Optional[str]: +def get_plaintext(secret: Union[SecretStr, SecretBytes, None, str]) -> Optional[Union[str, bytes]]: if isinstance(secret, (SecretStr, SecretBytes)): return secret.get_secret_value() else: