use PathLike type instead of str | Path

This commit is contained in:
scito
2022-12-29 23:17:31 +01:00
parent a5768ba1e6
commit 51094a1a18
6 changed files with 18 additions and 9 deletions
+2 -1
View File
@@ -76,10 +76,11 @@ Exception: {e}""")
except ImportError:
qreader_available = False
# TODO Workaround for PYTHON < 3.10: Union[int, None] used instead of int | None
# Types
Args = argparse.Namespace
OtpUrl = str
# Workaround for PYTHON < 3.10: use Union[int, None] instead of int | None
Otp = TypedDict('Otp', {'name': str, 'secret': str, 'issuer': str, 'type': str, 'counter': Union[int, None], 'url': OtpUrl})
Otps = list[Otp]
OtpUrls = list[OtpUrl]