-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Written by chatGPT
Background
Currently, the wcwidth library does not include any type hints, which prevents IDEs and static type checkers (e.g., mypy, Pyright) from inferring parameter and return types correctly.
Proposal
- Add
.pyistub files or inline type annotations following PEP 484 to provide comprehensive type information. - Optionally, contribute the stubs to typeshed or publish a separate
types-wcwidthpackage on PyPI.
Benefits
- Improved IDE auto-completion and documentation lookup.
- Enhanced compatibility with static type checkers, reducing potential runtime errors.
- Easier onboarding for new contributors and users who rely on type safety.
I’m not a native English speaker and used a translation tool—please feel free to suggest any wording improvements!
I wrote it myself
wcwidth does not contain any type hint, so the IDE cannot correctly infer the type
Therefore, I suggest adding type hint, such as adding .pyi file
Because my English is not good, I used Google Translate and chatGPT, please forgive me.
hugovk
Metadata
Metadata
Assignees
Labels
No labels