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 #688 kwarg injection does not work with decorated functions #689

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

seratch
Copy link
Member

@seratch seratch commented Jul 22, 2022

This pull request resolves #688

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

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

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.

  • 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 ./scripts/install_all_and_run_tests.sh after making the changes.

@seratch seratch added bug Something isn't working area:async area:sync labels Jul 22, 2022
@seratch seratch added this to the 1.14.3 milestone Jul 22, 2022
@seratch seratch self-assigned this Jul 22, 2022


def get_arg_names_of_callable(func: Callable) -> List[str]:
return inspect.getfullargspec(inspect.unwrap(func)).args
Copy link
Member Author

Choose a reason for hiding this comment

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

Having inspect.unwrap here is the fix for the issue

@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #689 (114e0a2) into main (c5349cc) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 114e0a2 differs from pull request most recent head 55b5ac5. Consider uploading reports for the commit 55b5ac5 to get more accurate results

@@            Coverage Diff             @@
##             main     #689      +/-   ##
==========================================
+ Coverage   92.05%   92.08%   +0.02%     
==========================================
  Files         172      172              
  Lines        5867     5887      +20     
==========================================
+ Hits         5401     5421      +20     
  Misses        466      466              
Impacted Files Coverage Δ
slack_bolt/authorization/async_authorize.py 85.10% <100.00%> (+0.10%) ⬆️
slack_bolt/authorization/authorize.py 84.89% <100.00%> (+0.10%) ⬆️
slack_bolt/lazy_listener/async_internals.py 87.50% <100.00%> (+0.83%) ⬆️
slack_bolt/lazy_listener/internals.py 87.50% <100.00%> (+0.83%) ⬆️
slack_bolt/listener/async_listener.py 98.43% <100.00%> (+0.02%) ⬆️
...bolt/listener/async_listener_completion_handler.py 96.00% <100.00%> (+0.16%) ⬆️
...lack_bolt/listener/async_listener_error_handler.py 96.66% <100.00%> (+0.11%) ⬆️
...lack_bolt/listener/async_listener_start_handler.py 96.00% <100.00%> (+0.16%) ⬆️
slack_bolt/listener/custom_listener.py 100.00% <100.00%> (ø)
slack_bolt/listener/listener_completion_handler.py 96.00% <100.00%> (+0.16%) ⬆️
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:async area:sync bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kwarg injection does not work with decorated functions
2 participants