pyjwt icon indicating copy to clipboard operation
pyjwt copied to clipboard

Typing on the get_unverified_header function

Open lindycoder opened this issue 2 years ago • 6 comments

Hello, thank you for the tool!

It seems the get_unverified_header is missing types to use in a strict mypy configuration!

https://github.com/jpadilla/pyjwt/blob/master/jwt/api_jws.py#L202

If I am not mistaken, this might do it:

def get_unverified_header(self, jwt: str) -> Dict[str, Any]:

lindycoder avatar Apr 06 '22 19:04 lindycoder

Actually based on what _load takes, jwt should be a Union[str, bytes]

lindycoder avatar Apr 06 '22 20:04 lindycoder

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jun 06 '22 02:06 github-actions[bot]

Removing stale just waiting for a maintainer to comment if this issue is valid or not.

lindycoder avatar Jun 07 '22 16:06 lindycoder

lgtm, can you open a PR?

jpadilla avatar Jun 07 '22 18:06 jpadilla

Thanks, I might look into it, might take a couple weeks though, pretty busy

lindycoder avatar Jun 07 '22 18:06 lindycoder

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Aug 07 '22 02:08 github-actions[bot]