Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pyjwt 2.x return type issue and make typing happy #123

Closed
wants to merge 4 commits into from
Closed

Fix pyjwt 2.x return type issue and make typing happy #123

wants to merge 4 commits into from

Conversation

athornton
Copy link
Collaborator

The functional change here is not to call decode() when what we get back from jwt.encode() is already a string rather than a bytes object.

We also update to the released flask-classful 0.16, which will unjam modernization of the rest of the codebase, which requires rewriting a bit of the authorization handling because parse_authorization_headers() will no longer be part of werkzeug (it's a from_header classmethod in werkzeug.Authorization).

I got sick of .DS_Store on my Mac making the repository dirty, so I added it to .gitignore.

Everything else is to get mypy happy with the current codebase--mostly marking all the things that were Optional and defaulted to None as such, marking abstract methods as such, and not then calling those abstract methods. That's going to make modernizing the codebase easier too.

@athornton athornton marked this pull request as draft December 19, 2023 22:46
@athornton
Copy link
Collaborator Author

Trying to do too much here. Making a smaller one.

@athornton athornton closed this Dec 19, 2023
@athornton athornton deleted the u/ajt/fixtypes branch December 20, 2023 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant