Common: Fix mypy error in encoding.py
This commit is contained in:
parent
dfa1709064
commit
4f04cf1c18
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue