You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Type Hints for Better Type Safety and IDE Support #271
Add Type Hints for Better Type Safety and IDE Support
Description
Currently, the python-pdfkit library does not provide type hints for its public API. This makes it harder for developers to leverage static type checking tools like mypy and reduces IDE autocompletion and linting capabilities.
Adding type hints will:
Improve developer experience by enabling better autocompletion and inline documentation.
Allow integration with static analysis tools for catching type-related bugs early.
Align the library with modern Python best practices (PEP 484).
Proposed Solution
Introduce type hints for all public functions, classes, and method signatures.
Add a py.typed marker file to indicate that the package is typed.
Ensure compatibility with Python 3.7+ (or the minimum supported version).
Optionally, provide a typing_extensions fallback for older versions if needed.
Activity