-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Chore: inline Variables that immediately Returned #690
Conversation
yezz123
commented
Sep 29, 2021
- I just fix some issues related to code.
- Refactor some Parts of the code.
inline Variables that immediately Returned & Refactor Code Expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please update tests to see this changes wont regress?
It's not a new feature to resolve in the tests, cause this is just a simple way to refactor some parts of code, I didn't add any function that why 😀 |
I understand but still the changes are significant so you can add some additional test on existing tests only |
I don't see where we can add this test, cause this is just some simple changes that why 🤔 |
https://github.com/jpadilla/pyjwt/tree/master/tests tests for related modules can be found here |
@auvipy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pure refactoring, looks good
+1 |
@@ -90,9 +90,6 @@ def encode( | |||
if headers and "alg" in headers and headers["alg"]: | |||
algorithm = headers["alg"] | |||
|
|||
if algorithm not in self._valid_algs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may I know why this was removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it just pass
statement, it has no influence except time spent for if condition check