-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Python: Adjust workflows TypeVars from prefix to suffix naming convention #3661
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR standardizes TypeVar naming conventions in the _workflows module by changing from prefix to suffix convention, aligning with the naming patterns used elsewhere in the codebase (e.g., ExecutorT, ContextT, ArgsT, ReturnT).
Changes:
- Renamed TypeVars to use suffix convention:
T_Out→OutT,T_W_Out→W_OutT,_T_EdgeGroup→EdgeGroupT, andGroupChatWorkflowContext_T_Out→GroupChatWorkflowContextOutT - Moved
EdgeGroupTTypeVar from class scope to module level for better accessibility - Removed
SharedStatefrom public API exports (remains available internally via private import)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
_workflow_context.py |
Updated TypeVar declarations (OutT, W_OutT) and all references in type annotations, comments, and error messages |
_magentic.py |
Updated import and all type annotations using GroupChatWorkflowContextOutT |
_group_chat.py |
Updated import and all type annotations using GroupChatWorkflowContextOutT |
_function_executor.py |
Updated documentation comments referencing the renamed TypeVars |
_executor.py |
Updated documentation comments referencing the renamed TypeVars |
_edge.py |
Moved EdgeGroupT TypeVar to module level and updated register method signature |
_base_group_chat_orchestrator.py |
Updated TypeAlias and all handler method signatures using GroupChatWorkflowContextOutT |
__init__.py |
Removed SharedState from public exports (internal implementation detail) |
Motivation and Context
Updates TypeVar naming in core/_workflows to use suffix convention consistent with the rest of the codebase:
Description
Contribution Checklist