Skip to content

Fix class attribute counts for stubs in pyrefly coverage report#3508

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

Fix class attribute counts for stubs in pyrefly coverage report#3508
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3400

Conversation

@jorenham
Copy link
Copy Markdown
Contributor

Summary

Non schema fields weren't counted if the init method had no implementation, not taking stubs into account.

Fixes #3400

Test Plan

This includes unit- and integration tests.

@meta-cla meta-cla Bot added the cla signed label May 20, 2026
@jorenham jorenham changed the title Fix instance attribute counts for stubs in pyrefly coverage report Fix class attribute counts for stubs in pyrefly coverage report May 20, 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. ✅

@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 D106044871.

@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 sometimes does not count annotated attributes as typed in numpy

2 participants