python / python/mypy

Improve stubtest usability for py files

Open
#13,195 1 comment 0 reactions 1 assignee View on GitHub

@hauntsaninja is already working on this.

Since Jul 20, 2022.

feature topic-stubtest
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Currently stubtest is very happy to treat "py" files as sources of type definitions. This is very useful, because it makes it easy to check packages that have mixed inline types and stubs (that may depend on each other).

But it does mean there is some counterintuitive behaviour where you'd expect to see something like "failed to find stubs". Basically, is it possible to salvage #12889 , #12896 (without becoming complicated enough that behaviour is unpredictable)?

Should also look into resolving some of the differences in the mypy build. Not going into detail (this is mostly a reminder for myself), but here are some links:
https://github.com/pandas-dev/pandas/issues/47760#issuecomment-1186306952
https://github.com/python/mypy/pull/13161#issuecomment-1186576852

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.