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
Provide pyright-friendly typing support (.pyi stubs / py.typed) #1125
When using construct with strict static type checkers (e.g. pyright/basedpyright), users get typing friction because the package does not provide dedicated stub files and pyright reports missing type information.
Current behavior
In projects with strict checking enabled, importing common primitives can trigger diagnostics like:
Stub file not found for "construct"
Example import:
fromconstructimportInt8ul, Int16ul, Int32ul
Expected behavior
construct should provide pyright-friendly typing metadata so strict checkers can type-check common usage without local workaround stubs.
Possible solutions
Ship a py.typed marker and improve inline annotations, or
Provide .pyi stubs for the public API (even partial/minimal initially), especially commonly used primitives/combinators.
Why this matters
Downstream projects currently maintain local custom stubs just to satisfy strict type checking, which is hard to maintain and easy to drift.
Activity