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 #1209 Add __all__ to __init__.py #1210

Merged
merged 2 commits into from
May 18, 2022
Merged

Conversation

seratch
Copy link
Member

@seratch seratch commented May 13, 2022

Summary

This pull request resolves #1209 by adding __all__ to __init__.py files.

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.

@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #1210 (828c25d) into main (5019f65) will decrease coverage by 0.01%.
The diff coverage is 98.56%.

@@            Coverage Diff             @@
##             main    #1210      +/-   ##
==========================================
- Coverage   86.55%   86.53%   -0.02%     
==========================================
  Files         111      111              
  Lines       10912    10934      +22     
==========================================
+ Hits         9445     9462      +17     
- Misses       1467     1472       +5     
Impacted Files Coverage Δ
slack_sdk/oauth/installation_store/models/bot.py 93.33% <ø> (ø)
slack_sdk/scim/async_client.py 0.00% <0.00%> (ø)
slack_sdk/web/async_base_client.py 98.33% <ø> (ø)
slack_sdk/__init__.py 100.00% <100.00%> (ø)
slack_sdk/audit_logs/__init__.py 100.00% <100.00%> (ø)
slack_sdk/audit_logs/async_client.py 100.00% <100.00%> (ø)
slack_sdk/audit_logs/v1/logs.py 99.42% <100.00%> (ø)
slack_sdk/http_retry/__init__.py 100.00% <100.00%> (ø)
slack_sdk/http_retry/async_handler.py 96.15% <100.00%> (+0.15%) ⬆️
slack_sdk/models/__init__.py 100.00% <100.00%> (ø)
... and 18 more

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 5019f65...828c25d. Read the comment docs.

@seratch
Copy link
Member Author

seratch commented May 13, 2022

In this pull request, I've fixed many mypy warnings too. That being said, it does not mean that we will use mypy for this project itself. We already use flake8 and pytype. These tools have been helping us to keep the quality at a high enough level. Spending more time for satisfying mypy is not the direction where we would like to head.

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

Looks good @seratch! Is there a way that we want to test that __all__ include the correct imports?

@seratch
Copy link
Member Author

seratch commented May 15, 2022

@mwbrooks

Is there a way that we want to test that all include the correct imports?

Good question! There is no way to write unit tests for it, but flake8 (linter) detects missing items if there is any.

@mwbrooks
Copy link
Member

Cool, at least flake8 will help ensure we add them going forward!

@seratch seratch merged commit b7f838b into slackapi:main May 18, 2022
@seratch seratch deleted the issue-1209 branch May 18, 2022 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mypy strict mode doesn't play well with less-specific slack_sdk.model imports
2 participants