Python: Adjust workflows TypeVars from prefix to suffix naming convention#3661
Merged
moonbox3 merged 4 commits intomicrosoft:mainfrom Feb 4, 2026
Merged
Python: Adjust workflows TypeVars from prefix to suffix naming convention#3661moonbox3 merged 4 commits intomicrosoft:mainfrom
moonbox3 merged 4 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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) |
Member
dmytrostruk
approved these changes
Feb 4, 2026
markwallace-microsoft
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Updates TypeVar naming in core/_workflows to use suffix convention consistent with the rest of the codebase:
Description
Contribution Checklist