Closed
Description
PyJWKClient.get_signing_key_from_jwt
method is not correctly type annotated. Even though the underlying code expects str | bytes
, the jwt
argument is only annotated with str
.
Expected Result
A def get_signing_key_from_jwt(self, token: str | bytes) -> PyJWK:
annotation, allowing the library users without having to extraneously decode the jwt.
Ideally, a single JWT: TypeAlias = str | bytes
type exported for the library users and used in all relevant annotations.