---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/inline/ok/fstring_format_spec_terminator.py
---
## AST

```
Module(
    ModModule {
        node_index: AtomicNodeIndex(..),
        range: 0..43,
        body: [
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 0..19,
                    value: FString(
                        ExprFString {
                            node_index: AtomicNodeIndex(..),
                            range: 0..19,
                            value: FStringValue {
                                inner: Single(
                                    FString(
                                        FString {
                                            range: 0..19,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 2..8,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: "hello ",
                                                    },
                                                ),
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 8..12,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: Name(
                                                            ExprName {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 9..10,
                                                                id: Name("x"),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: Some(
                                                            InterpolatedStringFormatSpec {
                                                                range: 11..11,
                                                                node_index: AtomicNodeIndex(..),
                                                                elements: [],
                                                            },
                                                        ),
                                                    },
                                                ),
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 12..18,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: " world",
                                                    },
                                                ),
                                            ],
                                            flags: FStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 20..42,
                    value: FString(
                        ExprFString {
                            node_index: AtomicNodeIndex(..),
                            range: 20..42,
                            value: FStringValue {
                                inner: Single(
                                    FString(
                                        FString {
                                            range: 20..42,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 22..28,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: "hello ",
                                                    },
                                                ),
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 28..35,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: Name(
                                                            ExprName {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 29..30,
                                                                id: Name("x"),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: Some(
                                                            InterpolatedStringFormatSpec {
                                                                range: 31..34,
                                                                node_index: AtomicNodeIndex(..),
                                                                elements: [
                                                                    Literal(
                                                                        InterpolatedStringLiteralElement {
                                                                            range: 31..34,
                                                                            node_index: AtomicNodeIndex(..),
                                                                            value: ".3f",
                                                                        },
                                                                    ),
                                                                ],
                                                            },
                                                        ),
                                                    },
                                                ),
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 35..41,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: " world",
                                                    },
                                                ),
                                            ],
                                            flags: FStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
        ],
    },
)
```
