Skip to content

also consider the .py of .pyi from stubs-only packages in pyrefly report #3105#3156

Open
jorenham wants to merge 3 commits intofacebook:mainfrom
jorenham:gh-3105
Open

also consider the .py of .pyi from stubs-only packages in pyrefly report #3105#3156
jorenham wants to merge 3 commits intofacebook:mainfrom
jorenham:gh-3105

Conversation

@jorenham
Copy link
Copy Markdown
Contributor

Summary

pyrefly report will now also take the source package sources into account when generating a report for stubs-only packages. Fo for e.g. scipy-stubs it'll now also look for scipy in the site packages and "overlay" the .pyi symbols onto the .py ones. This way, symbols missing the stubs will be reported as missing.

Fixes #3105 (which I accidentally closes already)

Test Plan

Tests added

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@connernilsen connernilsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jorenham, thanks for doing this. A few followups

Comment thread pyrefly/lib/commands/report.rs Outdated
Comment thread pyrefly/lib/commands/report.rs Outdated
@github-actions github-actions Bot added size/s and removed size/s labels Apr 17, 2026
@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. ✅

@connernilsen
Copy link
Copy Markdown
Contributor

Let me know when it's ready for another round of review by re-requesting me :)

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: For stubs-only packages, is the source package taken into account?

2 participants