This docstring suggests that currently bundled .pyi are prioritized over those from third party stubs packages:
|
def merge_files_with_stubs(package_files: list[str], typeshed_stubs: list[str]) -> list[str]: |
|
"""Merge package files with typeshed stubs, preferring .pyi files from the package itself.""" |
But this is at odds with the typing spec: https://typing.python.org/en/latest/spec/distributing.html#import-resolution-ordering
This can affect the coverage of e.g. scipy, which bundles a couple of incomplete .pyi that in scipy-stubs are actually complete.
A more extreme example would be numtype, which intends to override all of numpy's bundled stubs with its own numpy-stubs.