-
Notifications
You must be signed in to change notification settings - Fork 235
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix type hint for event constraint to allow None subtypes #616
fix type hint for event constraint to allow None subtypes #616
Conversation
Signed-off-by: Alexander Rashed <alexander.rashed@localstack.cloud>
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.
Hi @alexrashed, thanks for making this improvement! The changes on the docs and code are fine but can you revert the changes under docs/api-docs/
? We will generate the api-docs when making a new release.
Thank you! I am so glad to hear this 馃槂
The CLA Assistant service might have some issues when you accessed. Can you try visiting https://cla-assistant.io/slackapi/bolt-python again and signing our CLA there with the email address that you used for the commit in this PR? |
Signed-off-by: Alexander Rashed <alexander.rashed@localstack.cloud>
Thanks for the fast response! After some retries signing the CLA worked and I reverted the changes to the auto-generated docs. |
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.
Looks great to me. After merging this PR., I will apply the corresponding change to Japanese document page.
Codecov Report
@@ Coverage Diff @@
## main #616 +/- ##
=======================================
Coverage 91.46% 91.46%
=======================================
Files 170 170
Lines 5766 5766
=======================================
Hits 5274 5274
Misses 492 492
Continue to review full report at Codecov.
|
@alexrashed Thanks for your contribution 馃帀 |
This PR adjusts the type hints for event constraints such that the type hint explicitly allows
None
for the constraint.The additional optional represents the check implemented here:
bolt-python/slack_bolt/listener_matcher/builtins.py
Lines 146 to 148 in 54114ca
This change allows a type-safe usage of the explicit
None
subtype constraint: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.PS.: Thanks for the awesome framework, it really is fun to use! 馃挴
PPS.: The CLA tooling described in the contribution guideline doesn't really work for me (couldn't select anything), but I explicitly accepted the conditions by signing off the commit.