Skip to content

Dedupe Variable construction in pyrefly coverage#3772

Closed
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:coverage/dedupe-Variable-construction
Closed

Dedupe Variable construction in pyrefly coverage#3772
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:coverage/dedupe-Variable-construction

Conversation

@jorenham

@jorenham jorenham commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This is another pyrefly coverage-related refactor that dedupes the variable creation code in parse_variables, which was repeated 5 times. and simplifies some other related code.

This shouldn't result in any merge conflicts with the other (currently open) coverage refactor PRs.

Test Plan

Tests still pass (no behavior changes).

@github-actions

This comment has been minimized.

@NathanTempest

Copy link
Copy Markdown
Contributor

Thanks @jorenham, this is a satisfying cleanup. Folding the five Variable push sites into one let (annotation, slots) = match … and pulling out classify_annotation reads much better, and is_schema_class returning a bool is a nice simplification over threading the ClassBinding back out.

LGTM and importing now

@meta-codesync

meta-codesync Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

@jorenham jorenham force-pushed the coverage/dedupe-Variable-construction branch from 3dc74c7 to 091ed8b Compare June 12, 2026 09:33
@jorenham

Copy link
Copy Markdown
Contributor Author

Rebased onto main to resolve merge conflicts

@github-actions github-actions Bot added size/m and removed size/m labels Jun 12, 2026
@jorenham

Copy link
Copy Markdown
Contributor Author

The CI failures are unrelated

@github-actions

This comment has been minimized.

meta-codesync Bot pushed a commit that referenced this pull request Jun 12, 2026
Summary:
ref: #3772 (comment)

Pull Request resolved: #3786

Test Plan: The classic "wait and see if CI works now" approach.

Reviewed By: maggiemoss

Differential Revision: D108446033

Pulled By: NathanTempest

fbshipit-source-id: 30c4a47f15269d2b72be4578175189866b334161

@yangdanny97 yangdanny97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@jorenham jorenham force-pushed the coverage/dedupe-Variable-construction branch from 091ed8b to cb8d2da Compare June 12, 2026 19:57
@jorenham

Copy link
Copy Markdown
Contributor Author

rebased to fix CI

@github-actions github-actions Bot added size/m and removed size/m labels Jun 12, 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 meta-codesync Bot closed this in 401aa37 Jun 12, 2026
@meta-codesync meta-codesync Bot added the Merged label Jun 12, 2026
@meta-codesync

meta-codesync Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@NathanTempest merged this pull request in 401aa37.

@jorenham jorenham deleted the coverage/dedupe-Variable-construction branch June 12, 2026 20:32
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.

3 participants