Skip to content

Conversation

@pachewise
Copy link
Contributor

@pachewise pachewise commented Mar 1, 2025

Basically trying to remove "Unknown" or "partially unknown" pylance issues. Mostly with options, but there were a few simple other fixes (kwargs, segments, etc). This showed some minor bugs and a few code smells (passing too many args to api_jws.decode_complete, for example).

  • We should include Options / SigOptions / FullOptions in the docs somehow
  • PyJWT() is used as a singleton. Do we want to keep the options param in that case? Wondering because codecov is warning that we don't have a test for options is not None case.

@pachewise pachewise changed the title Fixes #660: Improve typing/logic for decode, decode_complete options Fixes #660: Improve typing/logic for options in decode, decode_complete Mar 1, 2025
@auvipy auvipy self-requested a review March 3, 2025 07:57
Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping me when it is ready for review

@pachewise
Copy link
Contributor Author

@auvipy this should be ready to review. Note that I changed the documentation to use docstrings/autodoc so that the docs don't get stale (I saw a few cases where that happened). Also added more docs where needed; let me know if you'd rather me separate that into another PR.

I still need an answer on whether we want to support the PyJWT(options) call. If no opinion, I will leave it untouched for now and add a test for the missing branch (see codecov failure)

@pachewise pachewise changed the title Fixes #660: Improve typing/logic for options in decode, decode_complete Fixes #660: Improve typing/logic for options in decode, decode_complete; Improve docs Mar 4, 2025
Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please fix the merge conflicts?

@auvipy auvipy merged commit 29fbfc3 into jpadilla:master Mar 5, 2025
23 checks passed
@pachewise pachewise deleted the fix/660 branch March 5, 2025 07:50
ryantqiu pushed a commit to snorkel-marlin-repos/jpadilla_pyjwt_pr_1045_453604b5-e4bf-4547-a21d-54a8ff772438 that referenced this pull request Oct 2, 2025
…lete; Improve docs

Original PR #1045 by pachewise
Original: jpadilla/pyjwt#1045
ryantqiu added a commit to snorkel-marlin-repos/jpadilla_pyjwt_pr_1045_453604b5-e4bf-4547-a21d-54a8ff772438 that referenced this pull request Oct 2, 2025
… in decode, decode_complete; Improve docs

Merged from original PR #1045
Original: jpadilla/pyjwt#1045
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.

2 participants