Skip to content

Remove unused symbol fields from pyrefly coverage#4250

Open
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:coverage/remove-unused-fields
Open

Remove unused symbol fields from pyrefly coverage#4250
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:coverage/remove-unused-fields

Conversation

@jorenham

@jorenham jorenham commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Some fields of Function, Variable, and Parameter were set but never read, and since only SymbolReport ends up in the JSON output, their Serialize derives were also unused.

This removes those fields and corresponding code, like the is_fully_annotated logic and the annotation source-code lookups. Parameter now stores its SlotRank directly, instead of two fields that merge_overloads immediately turned back into a SlotRank.

Oh and don't forget to check the diff counts ;)

Test Plan

Tests still pass; no behavior changes

@jorenham jorenham added the coverage Issues related to `pyrefly coverage`, `pyrefly report` label Jul 22, 2026
@meta-cla meta-cla Bot added the cla signed label Jul 22, 2026
@github-actions

This comment has been minimized.

@jorenham
jorenham force-pushed the coverage/remove-unused-fields branch from 077f500 to 4b5afbd Compare July 23, 2026 19:19
@github-actions github-actions Bot added size/s and removed size/s labels Jul 23, 2026
@jorenham

Copy link
Copy Markdown
Collaborator Author

rebased to resolve conflicts

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed coverage Issues related to `pyrefly coverage`, `pyrefly report` quansight size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants