Style: prefer type[Foo | Bar] over type[Foo] | type[Bar] (#10039)

This commit is contained in:
Alex Waygood
2023-04-13 10:34:53 +01:00
committed by GitHub
parent 084f555793
commit 2279886964
5 changed files with 45 additions and 43 deletions

View File

@@ -15,7 +15,7 @@ from .rsa_backend import RSAKey as BackendRSAKey
# then falling back on other imports
# these are all the potential options
AESKey: type[CryptographyAESKey] | None
HMACKey: type[CryptographyHMACKey] | type[NativeHMACKey]
RSAKey: type[CryptographyRSAKey] | type[BackendRSAKey] | None
ECKey: type[CryptographyECKey] | type[ECDSAECKey]
HMACKey: type[CryptographyHMACKey | NativeHMACKey]
RSAKey: type[CryptographyRSAKey | BackendRSAKey] | None
ECKey: type[CryptographyECKey | ECDSAECKey]
get_random_bytes: Callable[[int], bytes]