Skip to content

ENH: Added verbose display option for pyright test#30745

Open
ganesh-k13 wants to merge 1 commit intonumpy:mainfrom
ganesh-k13:pyright_verbose
Open

ENH: Added verbose display option for pyright test#30745
ganesh-k13 wants to merge 1 commit intonumpy:mainfrom
ganesh-k13:pyright_verbose

Conversation

@ganesh-k13
Copy link
Member

@ganesh-k13 ganesh-k13 commented Jan 30, 2026

Added verbose display option for pyright test

Why it's needed

Hard to interpret where pyright_completeness is failing exactly

Example:

spin run python tools/pyright_completeness.py --verifytypes numpy --ignoreexternal --exclude-like '*.tests.*' '*.conftest.*' --verbose

============================================================
Symbols with unknown types: 2
============================================================

[function] numpy.show_runtime
  WARNING: No docstring found for function "numpy.show_runtime"
    at /path/to/numpy/numpy/lib/_utils_impl.pyi:587:5
  ERROR: Return type is partially unknown
  Return type is "dict[Unknown, Unknown] | None"
    Type argument 1 for class "dict" has unknown type
    Type argument 2 for class "dict" has unknown type
    at /path/to/numpy/numpy/lib/_utils_impl.pyi:587:5

[function] numpy.matlib.show_runtime
  WARNING: No docstring found for function "numpy.matlib.show_runtime"
    at //path/to/numpy/numpy/__init__.pyi:417:5
  ERROR: Return type is partially unknown
  Return type is "dict[Unknown, Unknown] | None"
    Type argument 1 for class "dict" has unknown type
    Type argument 2 for class "dict" has unknown type
    at /path/to/numpy/numpy/__init__.pyi:417:5

Coverage 100.0% is below minimum required 100%

Notes:

  • Default behavior without --verbose stays the same, so no changes needed to CI
  • FYI, used Claude to generate the function

@mattip
Copy link
Member

mattip commented Jan 31, 2026

What does the failure look like before this change?

@ganesh-k13
Copy link
Member Author

What does the failure look like before this change?

Just this:

spin run python tools/pyright_completeness.py --verifytypes numpy --ignoreexternal --exclude-like '*.tests.*' '*.conftest.*' --verbose

Coverage 100.0% is below minimum required 100%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants