-
Notifications
You must be signed in to change notification settings - Fork 833
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 return type annotation #1234
Conversation
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.
Thank you very much for improving this
@@ -136,7 +136,7 @@ async def perform_user_token_rotation( # type: ignore | |||
refreshed_installation.user_token = refresh_response.get("access_token") | |||
refreshed_installation.user_refresh_token = refresh_response.get("refresh_token") | |||
refreshed_installation.user_token_expires_at = int(time()) + int(refresh_response.get("expires_in")) | |||
return refreshed_installation # type: ignore |
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.
This may be still necessary if the pytype validation fails. In the case, could you revert this change?
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.
It seems that pytype is happy with this removal. We can keep this as-is,
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.
pytype validation has passed!
Is not right?
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.
Sorry I meant you don't need to change this!
@ehdgua01 Thank you very much for taking the time to correct the type hint! |
Ok, I signed it 😄 |
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.
LGTM. Once the CI builds become successful, we will merge this PR!
Codecov Report
@@ Coverage Diff @@
## main #1234 +/- ##
==========================================
- Coverage 86.57% 86.53% -0.04%
==========================================
Files 111 111
Lines 10986 10986
==========================================
- Hits 9511 9507 -4
- Misses 1475 1479 +4
Continue to review full report at Codecov.
|
Summary
Fix wrong return type annotation
Category (place an
x
in each of the[ ]
)/docs-src
(Documents, have you run./scripts/docs.sh
?)/docs-src-v2
(Documents, have you run./scripts/docs-v2.sh
?)/tutorial
(PythOnBoardingBot tutorial)tests
/integration_tests
(Automated tests for this library)Requirements (place an
x
in each[ ]
)python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh
after making the changes.