-
Notifications
You must be signed in to change notification settings - Fork 245
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 #709 Enable developers to inject non-bolt arguments to listener function args #712
Conversation
…stener function args
logger.warning(f"Unknown Request object type detected ({type(request)})") | ||
|
||
if name not in found_arg_names: | ||
logger.warning(f"{name} is not a valid argument") | ||
kwargs[name] = None |
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.
To allow developers to inject extra args, we remove this logic
logger.warning(f"Unknown Request object type detected ({type(request)})") | ||
|
||
if name not in found_arg_names: | ||
logger.warning(f"{name} is not a valid argument") | ||
kwargs[name] = None |
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.
To allow developers to inject extra args, we remove this logic
@@ -81,8 +83,9 @@ def __call__( | |||
found_arg_names = kwargs.keys() | |||
for name in self.arg_names: | |||
if name not in found_arg_names: | |||
self.logger.warning(f"{name} is not a valid argument") | |||
kwargs[name] = None |
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.
To allow developers to inject extra args, we remove this logic
@@ -77,8 +79,9 @@ async def __call__( | |||
found_arg_names = kwargs.keys() | |||
for name in self.arg_names: | |||
if name not in found_arg_names: | |||
self.logger.warning(f"{name} is not a valid argument") | |||
kwargs[name] = None |
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.
To allow developers to inject extra args, we remove this logic
This pull request is still in progress. Existing tests detected regressions. |
After looking into this more deeply, I concluded this enhancement is not feasible. Even if it's feasible in some way, I don't think it's maintainable for us. Let me close this my proposal here. |
This pull request resolves #709
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.