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 return type annotation #1234

Merged
merged 1 commit into from
Jul 8, 2022
Merged

Fix return type annotation #1234

merged 1 commit into from
Jul 8, 2022

Conversation

ehdgua01
Copy link
Contributor

@ehdgua01 ehdgua01 commented Jul 8, 2022

Summary

Fix wrong return type annotation

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /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 [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@CLAassistant
Copy link

CLAassistant commented Jul 8, 2022

CLA assistant check
All committers have signed the CLA.

@seratch seratch added this to the 3.17.3 milestone Jul 8, 2022
@seratch seratch self-assigned this Jul 8, 2022
@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented Version: 3x oauth labels Jul 8, 2022
Copy link
Member

@seratch seratch left a 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
Copy link
Member

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?

Copy link
Member

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,

Copy link
Contributor Author

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?

Copy link
Member

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!

@seratch
Copy link
Member

seratch commented Jul 8, 2022

@ehdgua01 Thank you very much for taking the time to correct the type hint!
Without a signed CLA, we are unable to merge your contribution. Would you mind signing our CLA? Please check the above bot message.

@ehdgua01
Copy link
Contributor Author

ehdgua01 commented Jul 8, 2022

Ok, I signed it 😄

Copy link
Member

@seratch seratch left a 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
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #1234 (8f44702) into main (a72b5e4) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            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     
Impacted Files Coverage Δ
slack_sdk/oauth/token_rotation/async_rotator.py 74.54% <0.00%> (ø)
slack_sdk/socket_mode/builtin/internals.py 72.80% <0.00%> (-1.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a72b5e4...8f44702. Read the comment docs.

@seratch seratch merged commit 4ae090e into slackapi:main Jul 8, 2022
@seratch seratch modified the milestones: 3.17.3, 3.18.0 Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented oauth Version: 3x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants