-
Notifications
You must be signed in to change notification settings - Fork 250
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
disc: remove the optional typing of client #1143
Conversation
@@ -41,7 +41,7 @@ def listener_runner(self) -> "AsyncioListenerRunner": # type: ignore[name-defin | |||
return self["listener_runner"] | |||
|
|||
@property | |||
def client(self) -> Optional[AsyncWebClient]: |
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.
Relevant change ⬆️
@@ -42,7 +42,7 @@ def listener_runner(self) -> "ThreadListenerRunner": # type: ignore[name-define | |||
return self["listener_runner"] | |||
|
|||
@property | |||
def client(self) -> Optional[WebClient]: |
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.
Relevant change ⬆️
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1143 +/- ##
=======================================
Coverage 92.02% 92.02%
=======================================
Files 195 195
Lines 6631 6631
=======================================
Hits 6102 6102
Misses 529 529 ☔ View full report in Codecov by Sentry. |
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.
Thanks, indeed the the type can be non-optional now; looks good to me
This PR opens the discussion to why the
context.client
property isOptional
Looking back to #31 its seems like the original implementation of the client property could return
None
, but this implementation has now changed.Original implementation:
Can we now remove this
Optional
type annotation, I cannot come up with a use case wherecontext.client
could beNone
, let me know if missing context around this 🤔Category (place an
x
in each of the[ ]
)slack_bolt.App
and/or its core componentsslack_bolt.async_app.AsyncApp
and/or its core componentsslack_bolt.adapter
/docs
Requirements (place an
x
in each[ ]
)Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/install_all_and_run_tests.sh
after making the changes.