From 0252995973aeaa1b565b05fbf0ddce8e37c6ac11 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 9 Aug 2023 18:13:29 -0400 Subject: [PATCH] Document `FormatSpec` fields (#6458) --- crates/ruff_python_literal/src/format.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/ruff_python_literal/src/format.rs b/crates/ruff_python_literal/src/format.rs index 43565966f2..89e7ef852a 100644 --- a/crates/ruff_python_literal/src/format.rs +++ b/crates/ruff_python_literal/src/format.rs @@ -188,14 +188,23 @@ impl FormatParse for FormatType { #[derive(Debug, PartialEq)] pub struct FormatSpec { + // Ex) `!s` in `'{!s}'` conversion: Option, + // Ex) `*` in `'{:*^30}'` fill: Option, + // Ex) `<` in `'{:<30}'` align: Option, + // Ex) `+` in `'{:+f}'` sign: Option, + // Ex) `#` in `'{:#x}'` alternate_form: bool, + // Ex) `30` in `'{:<30}'` width: Option, + // Ex) `,` in `'{:,}'` grouping_option: Option, + // Ex) `2` in `'{:.2}'` precision: Option, + // Ex) `f` in `'{:+f}'` format_type: Option, }