Use kebab-case for serde enums (#3080)

By default, these serialize as (e.g.) `LowestDirect`. This now matches
the format we use in Ruff.
This commit is contained in:
Charlie Marsh 2024-04-16 21:13:39 -04:00 committed by GitHub
parent 40d5a8adcf
commit b3f98d5e05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 21 additions and 0 deletions

View file

@ -203,6 +203,7 @@ fn parse_scripts(
}
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
pub enum LinkMode {
/// Clone (i.e., copy-on-write) packages from the wheel into the site packages.