Skip to content

fix(typing): Explicitly declare public API #3

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

corneliusroemer
Copy link

Pyright flags our orjsonl.append because PEP 484’s stub-file export rules (import-as-alias or all) are applied to all py.typed libraries (PEP 561).

We therefore need to re-export append explicitly, e.g. append as append or via all, so type checkers recognise it as part of the public API.

This is fixed by reexporting as done in this PR.

Pyright flags our `orjsonl.append` because PEP 484’s stub-file export rules (import-as-alias or __all__) are applied to all py.typed libraries (PEP 561). 

We therefore need to re-export append explicitly, e.g. append as append or via __all__, so type checkers recognise it as part of the public API.

This is fixed by reexporting as done in this PR.
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

Successfully merging this pull request may close these issues.

1 participant