Skip to content

Request for Complete Typing Support in python-docx #1432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
taabishm2 opened this issue Sep 14, 2024 · 1 comment
Closed

Request for Complete Typing Support in python-docx #1432

taabishm2 opened this issue Sep 14, 2024 · 1 comment

Comments

@taabishm2
Copy link

python-docx currently lacks type hints. This absence causes numerous type errors when running mypy, making it difficult to use the library in type-checked codebases. mypy output indicates multiple type errors throughout python-docx, including incompatible types in assignments, missing return statements, and argument type mismatches.

Task: Add type hints directly to the codebase to provide static typing support compliant with PEP 561. Alternatively, create or support an external stub package (e.g., types-docx).

@scanny
Copy link
Contributor

scanny commented Sep 14, 2024

Try updating your version of python-docx. Those were added recently. There might still be some missing further down in the library but the API you're likely to use should have good coverage.

@scanny scanny closed this as completed Sep 14, 2024
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

No branches or pull requests

2 participants