-
Notifications
You must be signed in to change notification settings - Fork 8
enhancement: Add support for function args & kwargs type hints in ctx.run. #109
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
enhancement: Add support for function args & kwargs type hints in ctx.run. #109
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Hey @objecthuman looks great, did an initial pass. |
|
@igalshilman |
|
Hey this is the reason the test is failing: Seems something related to this change i guess? |
|
@objecthuman fyi |
|
added fixes could you pls re-run the ci? @igalshilman / @slinkydeveloper |
|
@igalshilman all the checks have passed. when, who will merge the pr and can you also pls tell me how the release will take place? |
|
@objecthuman merged! thanks a lot for your contribution, we’ll coordinate a release in the upcoming days. |
Add support for function args & kwargs type hints in ctx.run.
Description
This pr adds a new function
run_typedin the context class. The function is a direct replacement to existingctx.runfunction.Why this change is introduced?
runfunction does not support type hints for theactionfunction's parameters.runfunction does not support keyword arguments for theactionfunction.Changes Introduced
Code changes
run_typedinside ofcontext.py.RunOptionsdataclass to bundle all the additional parameters previously passed toctx.run, now passed as a single parameter torun_typed.runfunction inside ofcontext.pyhas been deprecated withtyping_extensions.deprecatedrun_typedinside ofserver_context.pyctx.run_typedinstead ofctx.run.Dependency changes
typing-extensions>=4.14.0as direct dependency for the sdk, as this package helps in marking functions as deprecated.Version changes
0.8.0to0.9.0