Enforce valid format options in spec tests (#9021)

This commit is contained in:
Micha Reiser 2023-12-06 16:15:06 +09:00 committed by GitHub
parent b4a050c21d
commit ee6548d7dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 83 additions and 39 deletions

View file

@ -11,7 +11,7 @@ use std::str::FromStr;
#[cfg_attr(
feature = "serde",
derive(serde::Serialize, serde::Deserialize),
serde(default)
serde(default, deny_unknown_fields)
)]
pub struct PyFormatOptions {
/// Whether we're in a `.py` file or `.pyi` file, which have different rules.