pytest-dev / pytest-dev/pytest-xdist

Add a py.typed file

Open
#1,121 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
287
Avg merge
9h 30m
Merged PRs (30d)
2

Description

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 (https://github.com/pytest-dev/pytest-xdist/pull/1065).
Could we add a py.typed file to allow downstreams to take advantage of it too?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking how the pytest-xdist package is laid out and how its packaging metadata includes package files. Confirm the existing typing work from the 3.6.0 release, then add the requested py.typed marker and verify that downstream mypy can analyze xdist.workermanage without the missing-marker error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.