Skip to content

feat(python): add overloads for CopilotClient.on()#589

Open
brettcannon wants to merge 5 commits intogithub:mainfrom
brettcannon:on
Open

feat(python): add overloads for CopilotClient.on()#589
brettcannon wants to merge 5 commits intogithub:mainfrom
brettcannon:on

Conversation

@brettcannon
Copy link
Contributor

Along the way, make the first argument positional-only since the parameter name does not make sense to specify as a keyword argument.

@brettcannon brettcannon requested a review from a team as a code owner February 26, 2026 00:14
Copilot AI review requested due to automatic review settings February 26, 2026 00:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Python typing improvements for CopilotClient.on() by introducing overloads for its two supported call patterns and making the first argument positional-only to discourage meaningless keyword usage.

Changes:

  • Added @overload signatures for CopilotClient.on() to distinguish on(handler) vs on(event_type, handler).
  • Made the first on() parameter positional-only (/) in the implementation signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants