Skip to content

Fix inherited stub method.counts in pyrefly coverage report#3521

Open
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3519
Open

Fix inherited stub method.counts in pyrefly coverage report#3521
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3519

Conversation

@jorenham
Copy link
Copy Markdown
Contributor

@jorenham jorenham commented May 21, 2026

Summary

This fixes an issue where inherited methods in stubs from being incorrectly counted as untyped. This affects NumPy in several places, causing its type coverage to be too low.

Fixes #3519

Test Plan

This includes unit- and integration tests.

@github-actions
Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 22, 2026

@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this in D106045275.

@yangdanny97
Copy link
Copy Markdown
Contributor

failing test seems unrelated, maybe trunk is broken

@yangdanny97 yangdanny97 self-assigned this May 22, 2026
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.

pyrefly report counts inherited typed stub methods as untyped in NumPy

2 participants