Common: Fix mypy error in encoding.py

This commit is contained in:
Kekoa Kaaikala 2022-09-21 17:07:11 +00:00
parent dfa1709064
commit 4f04cf1c18
1 changed files with 1 additions and 1 deletions

View File

@ -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: