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
Contributor

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.

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.

1 participant