Skip to content

Conversation

ChihweiLHBird
Copy link
Member

When investigate an issue, I found adding these type annotations would make dev life easier to trace the types of different member variables.

@ChihweiLHBird ChihweiLHBird requested a review from a team as a code owner September 14, 2025 20:25
Copy link

@Copilot 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

This PR adds type annotations to the constructor parameters of the WorkerManager class to improve type safety and developer experience when investigating issues. The changes provide explicit typing for function parameters and member variables.

  • Added type annotations for all constructor parameters in WorkerManager.__init__
  • Changed worker_state parameter type from dict[str, Any] to MutableMapping[str, Any] in both Worker and WorkerManager classes
  • Added necessary imports for the new type annotations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
sanic/worker/process.py Updated Worker constructor to use MutableMapping type and added import
sanic/worker/manager.py Added comprehensive type annotations to WorkerManager constructor parameters and updated imports

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ChihweiLHBird ChihweiLHBird requested a review from a team October 3, 2025 04:36
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.

2 participants