Skip to content

Support multi-target assign aliases in pyrefly coverage report#3510

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

Support multi-target assign aliases in pyrefly coverage report#3510
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3506

Conversation

@jorenham
Copy link
Copy Markdown
Contributor

Summary

Multi-target assignment aliases of functions (a = b = func) are now treated consistently with single-target assignments (a = func; b = func).

Fixes #3506

Test Plan

This includes unit- and integration tests.

Comment on lines +802 to +808
fn untyped_if_call(expr: &Expr) -> SlotCounts {
if let Expr::Call(_) = expr {
SlotCounts::untyped()
} else {
SlotCounts::default()
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this helper avoids code duplication in the NameAssign and MultiTargetAssign cases

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

@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 aliases in multi-assignment expressions as untyped

2 participants