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

Chore: inline Variables that immediately Returned #690

Merged
merged 3 commits into from Oct 3, 2021
Merged

Chore: inline Variables that immediately Returned #690

merged 3 commits into from Oct 3, 2021

Conversation

yezz123
Copy link
Contributor

@yezz123 yezz123 commented Sep 29, 2021

  • I just fix some issues related to code.
  • Refactor some Parts of the code.

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 update tests to see this changes wont regress?

@yezz123
Copy link
Contributor Author

yezz123 commented Sep 29, 2021

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 😀

@auvipy
Copy link
Collaborator

auvipy commented Sep 29, 2021

I understand but still the changes are significant so you can add some additional test on existing tests only

@yezz123
Copy link
Contributor Author

yezz123 commented Sep 29, 2021

I understand but still, the changes are significant so you can add some additional tests on existing tests only

I don't see where we can add this test, cause this is just some simple changes that why 🤔

@auvipy
Copy link
Collaborator

auvipy commented Sep 29, 2021

https://github.com/jpadilla/pyjwt/tree/master/tests tests for related modules can be found here

@beliaev-maksim
Copy link

@auvipy,
I just review changes. It is purely refactoring, no functionality was changed, you do not need additional tests

Copy link

@beliaev-maksim beliaev-maksim left a 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

@dajiaji
Copy link
Contributor

dajiaji commented Oct 3, 2021

+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:
Copy link
Collaborator

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?

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

@auvipy auvipy merged commit a988e1a into jpadilla:master Oct 3, 2021
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.

None yet

4 participants