julien-duponchelle / julien-duponchelle/python-mysql-replication

Proposal: Add typing

Open
#434 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.4k
Forks
690
PR merge metrics
No merged PRs in 30d

Description

### Description
Adding typing support to the python-mysql-replication library could significantly improve code quality and maintainability. Type annotations help developers understand code more quickly, prevent certain errors, and allow modern IDEs to provide better tooling and auto-completion.

### Scope
I am suggesting to add typing gradually throughout the codebase, starting with the core modules and gradually extending to other areas. This approach will allow us to ensure that the changes are solid and working as expected.

### Proposal
Here's a rough outline of the proposed changes:

1. Add type hints to core classes and functions in the project.
2. Utilize mypy or other static type checking tools to enforce type consistency.
3. Gradually apply typing to other parts of the codebase.
4. Update documentation to reflect the newly added types.

And if you agree with this proposal, I'll write a PR quickly to start implementing the changes. Your support and collaboration in this enhancement would be greatly appreciated.

Contributor guide

Open the contributing guide

Research direction

The proposal names no specific files or tests. Start by identifying the core modules, classes, and functions that would receive annotations, then determine how static type checking and documentation updates should cover the gradually expanded scope. Done would require an agreed rollout, type checking configuration, annotations across the selected areas, and corresponding documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.