Skip to content
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

Add a py.typed file #1121

Open
dmtucker opened this issue Aug 27, 2024 · 1 comment
Open

Add a py.typed file #1121

dmtucker opened this issue Aug 27, 2024 · 1 comment

Comments

@dmtucker
Copy link

Hey there 👋
I'm in the process of adding types to pytest-mypy, which integrates with xdist in part via the pytest_configure_node hook.
The type for the node parameter is available from xdist.workermanage, but mypy still emits the following error:

error: Skipping analyzing "xdist.workermanage": module is installed, but missing library stubs or py.typed marker  [import-untyped]
note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

I see lots of typing work was done to xdist in 3.6.0 (#1065).
Could we add a py.typed file to allow downstreams to take advantage of it too?

@bluetech
Copy link
Member

I already managed to forget the details, but at the time I wrote "The typings are not exposed as that would need some work on the public API". I think what I meant is that we should clearly delineate what is considered public/stable API (that should be properly typed and audited, and the typing should not break), and what is considered private.

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

7 participants
@bluetech @dmtucker and others