Skip to content

Dedupe redundant serde attributes in pyrefly_config#4147

Open
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:pyrefly_config/serde-cleanup
Open

Dedupe redundant serde attributes in pyrefly_config#4147
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:pyrefly_config/serde-cleanup

Conversation

@jorenham

Copy link
Copy Markdown
Collaborator

Summary

Every Option field in the config structs repeated #[serde(default, skip_serializing_if = "Option::is_none")], and some flatten and skip fields also had a default that serde ignores or already implicitly uses.
This updates the config structs to use #[skip_serializing_none] from serde_with for the entire struct, and removes the redundant serde stuff.

Spotted while working on #4146.

Test Plan

Tests still pass; no behavior changes.

@meta-codesync

meta-codesync Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

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

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