Closed hasinaxp closed 3 months ago
Recent changes enhance the robustness and clarity of the Kairon codebase. The CallbackActionConfigRequest
class now initializes its metadata_list
attribute with an empty list by default, preventing potential None
errors. Additionally, the naming of parameters in the run_pyscript
function was updated for better clarity, aligning with improved variable naming practices. Corresponding adjustments were made in the unit tests to reflect these changes, promoting consistency across the code.
File Path | Change Summary |
---|---|
kairon/api/models.py |
Updated metadata_list in CallbackActionConfigRequest to default to an empty list ([] ). |
kairon/async_callback/processor.py |
Renamed parameter in run_pyscript from 'script' to 'source_code' for enhanced clarity. |
tests/unit_test/callback_test.py |
Updated mock call in test_run_pyscript to reflect the parameter name change from 'script' to 'source_code' . |
🐰 In fields of code, I hop with glee,
Metadata lists, now safe as can be!
From scripts to sources, we’ve made it right,
Clarity shines, oh what a delight!
With every change, our world feels bright! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Bug Fixes
metadata_list
attribute in theCallbackActionConfigRequest
class is initialized to an empty list by default, preventing potential errors related to uninitialized attributes.Refactor
'script'
to'source_code'
in therun_pyscript
function for improved clarity in the lambda invocation.Tests
'script'
to'source_code'
in thetest_run_pyscript
function for consistency and clarity.