-
Notifications
You must be signed in to change notification settings - Fork 5k
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
task: added warning when none is called in intervention handler #4149
task: added warning when none is called in intervention handler #4149
Conversation
@microsoft-github-policy-service agree |
python/packages/autogen-core/src/autogen_core/base/intervention.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-core/src/autogen_core/base/intervention.py
Outdated
Show resolved
Hide resolved
@goyalpramod would you be able to fix the two failing checks? You can find instructions here https://github.com/microsoft/autogen/tree/main/python#development |
Why are these changes needed?
The user may be returning none by mistake, explicitly informing them about it can be helpful
I have used the Python in-built library warnings to fix this issue, it checks if a handler call is None, if it is. It returns a warning otherwise returns the original result
Related issue number
Closes #3621
Note
I ran all tests and ran into some issues with
autogen-core\tests\execution\test_user_defined_functions.py
. I am unsure if it was caused by my changes, but I believe that should not be the case.Checks