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

```
Module(
    ModModule {
        node_index: AtomicNodeIndex(..),
        range: 0..403,
        body: [
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 44..74,
                    value: TString(
                        ExprTString {
                            node_index: AtomicNodeIndex(..),
                            range: 44..74,
                            value: TStringValue {
                                inner: Single(
                                    TString(
                                        TString {
                                            range: 44..74,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 46..58,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: "Magic wand: ",
                                                    },
                                                ),
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 58..73,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: Subscript(
                                                            ExprSubscript {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 60..71,
                                                                value: Name(
                                                                    ExprName {
                                                                        node_index: AtomicNodeIndex(..),
                                                                        range: 60..63,
                                                                        id: Name("bag"),
                                                                        ctx: Load,
                                                                    },
                                                                ),
                                                                slice: StringLiteral(
                                                                    ExprStringLiteral {
                                                                        node_index: AtomicNodeIndex(..),
                                                                        range: 64..70,
                                                                        value: StringLiteralValue {
                                                                            inner: Single(
                                                                                StringLiteral {
                                                                                    range: 64..70,
                                                                                    node_index: AtomicNodeIndex(..),
                                                                                    value: "wand",
                                                                                    flags: StringLiteralFlags {
                                                                                        quote_style: Single,
                                                                                        prefix: Empty,
                                                                                        triple_quoted: false,
                                                                                    },
                                                                                },
                                                                            ),
                                                                        },
                                                                    },
                                                                ),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: None,
                                                    },
                                                ),
                                            ],
                                            flags: TStringFlags {
                                                quote_style: Single,
                                                prefix: Regular,
                                                triple_quoted: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 95..112,
                    value: TString(
                        ExprTString {
                            node_index: AtomicNodeIndex(..),
                            range: 95..112,
                            value: TStringValue {
                                inner: Single(
                                    TString(
                                        TString {
                                            range: 95..112,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 97..111,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: Call(
                                                            ExprCall {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 98..110,
                                                                func: Attribute(
                                                                    ExprAttribute {
                                                                        node_index: AtomicNodeIndex(..),
                                                                        range: 98..107,
                                                                        value: StringLiteral(
                                                                            ExprStringLiteral {
                                                                                node_index: AtomicNodeIndex(..),
                                                                                range: 98..102,
                                                                                value: StringLiteralValue {
                                                                                    inner: Single(
                                                                                        StringLiteral {
                                                                                            range: 98..102,
                                                                                            node_index: AtomicNodeIndex(..),
                                                                                            value: "\n",
                                                                                            flags: StringLiteralFlags {
                                                                                                quote_style: Single,
                                                                                                prefix: Empty,
                                                                                                triple_quoted: false,
                                                                                            },
                                                                                        },
                                                                                    ),
                                                                                },
                                                                            },
                                                                        ),
                                                                        attr: Identifier {
                                                                            id: Name("join"),
                                                                            range: 103..107,
                                                                            node_index: AtomicNodeIndex(..),
                                                                        },
                                                                        ctx: Load,
                                                                    },
                                                                ),
                                                                arguments: Arguments {
                                                                    range: 107..110,
                                                                    node_index: AtomicNodeIndex(..),
                                                                    args: [
                                                                        Name(
                                                                            ExprName {
                                                                                node_index: AtomicNodeIndex(..),
                                                                                range: 108..109,
                                                                                id: Name("a"),
                                                                                ctx: Load,
                                                                            },
                                                                        ),
                                                                    ],
                                                                    keywords: [],
                                                                },
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: None,
                                                    },
                                                ),
                                            ],
                                            flags: TStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 148..220,
                    value: TString(
                        ExprTString {
                            node_index: AtomicNodeIndex(..),
                            range: 148..220,
                            value: TStringValue {
                                inner: Single(
                                    TString(
                                        TString {
                                            range: 148..220,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 152..169,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: "A complex trick: ",
                                                    },
                                                ),
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 169..217,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: Subscript(
                                                            ExprSubscript {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 175..185,
                                                                value: Name(
                                                                    ExprName {
                                                                        node_index: AtomicNodeIndex(..),
                                                                        range: 175..178,
                                                                        id: Name("bag"),
                                                                        ctx: Load,
                                                                    },
                                                                ),
                                                                slice: StringLiteral(
                                                                    ExprStringLiteral {
                                                                        node_index: AtomicNodeIndex(..),
                                                                        range: 179..184,
                                                                        value: StringLiteralValue {
                                                                            inner: Single(
                                                                                StringLiteral {
                                                                                    range: 179..184,
                                                                                    node_index: AtomicNodeIndex(..),
                                                                                    value: "bag",
                                                                                    flags: StringLiteralFlags {
                                                                                        quote_style: Single,
                                                                                        prefix: Empty,
                                                                                        triple_quoted: false,
                                                                                    },
                                                                                },
                                                                            ),
                                                                        },
                                                                    },
                                                                ),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: None,
                                                    },
                                                ),
                                            ],
                                            flags: TStringFlags {
                                                quote_style: Single,
                                                prefix: Regular,
                                                triple_quoted: true,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 221..254,
                    value: TString(
                        ExprTString {
                            node_index: AtomicNodeIndex(..),
                            range: 221..254,
                            value: TStringValue {
                                inner: Single(
                                    TString(
                                        TString {
                                            range: 221..254,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 223..253,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: TString(
                                                            ExprTString {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 224..252,
                                                                value: TStringValue {
                                                                    inner: Single(
                                                                        TString(
                                                                            TString {
                                                                                range: 224..252,
                                                                                node_index: AtomicNodeIndex(..),
                                                                                elements: [
                                                                                    Interpolation(
                                                                                        InterpolatedElement {
                                                                                            range: 226..251,
                                                                                            node_index: AtomicNodeIndex(..),
                                                                                            expression: TString(
                                                                                                ExprTString {
                                                                                                    node_index: AtomicNodeIndex(..),
                                                                                                    range: 227..250,
                                                                                                    value: TStringValue {
                                                                                                        inner: Single(
                                                                                                            TString(
                                                                                                                TString {
                                                                                                                    range: 227..250,
                                                                                                                    node_index: AtomicNodeIndex(..),
                                                                                                                    elements: [
                                                                                                                        Interpolation(
                                                                                                                            InterpolatedElement {
                                                                                                                                range: 229..249,
                                                                                                                                node_index: AtomicNodeIndex(..),
                                                                                                                                expression: TString(
                                                                                                                                    ExprTString {
                                                                                                                                        node_index: AtomicNodeIndex(..),
                                                                                                                                        range: 230..248,
                                                                                                                                        value: TStringValue {
                                                                                                                                            inner: Single(
                                                                                                                                                TString(
                                                                                                                                                    TString {
                                                                                                                                                        range: 230..248,
                                                                                                                                                        node_index: AtomicNodeIndex(..),
                                                                                                                                                        elements: [
                                                                                                                                                            Interpolation(
                                                                                                                                                                InterpolatedElement {
                                                                                                                                                                    range: 232..247,
                                                                                                                                                                    node_index: AtomicNodeIndex(..),
                                                                                                                                                                    expression: TString(
                                                                                                                                                                        ExprTString {
                                                                                                                                                                            node_index: AtomicNodeIndex(..),
                                                                                                                                                                            range: 233..246,
                                                                                                                                                                            value: TStringValue {
                                                                                                                                                                                inner: Single(
                                                                                                                                                                                    TString(
                                                                                                                                                                                        TString {
                                                                                                                                                                                            range: 233..246,
                                                                                                                                                                                            node_index: AtomicNodeIndex(..),
                                                                                                                                                                                            elements: [
                                                                                                                                                                                                Interpolation(
                                                                                                                                                                                                    InterpolatedElement {
                                                                                                                                                                                                        range: 235..245,
                                                                                                                                                                                                        node_index: AtomicNodeIndex(..),
                                                                                                                                                                                                        expression: TString(
                                                                                                                                                                                                            ExprTString {
                                                                                                                                                                                                                node_index: AtomicNodeIndex(..),
                                                                                                                                                                                                                range: 236..244,
                                                                                                                                                                                                                value: TStringValue {
                                                                                                                                                                                                                    inner: Single(
                                                                                                                                                                                                                        TString(
                                                                                                                                                                                                                            TString {
                                                                                                                                                                                                                                range: 236..244,
                                                                                                                                                                                                                                node_index: AtomicNodeIndex(..),
                                                                                                                                                                                                                                elements: [
                                                                                                                                                                                                                                    Interpolation(
                                                                                                                                                                                                                                        InterpolatedElement {
                                                                                                                                                                                                                                            range: 238..243,
                                                                                                                                                                                                                                            node_index: AtomicNodeIndex(..),
                                                                                                                                                                                                                                            expression: BinOp(
                                                                                                                                                                                                                                                ExprBinOp {
                                                                                                                                                                                                                                                    node_index: AtomicNodeIndex(..),
                                                                                                                                                                                                                                                    range: 239..242,
                                                                                                                                                                                                                                                    left: NumberLiteral(
                                                                                                                                                                                                                                                        ExprNumberLiteral {
                                                                                                                                                                                                                                                            node_index: AtomicNodeIndex(..),
                                                                                                                                                                                                                                                            range: 239..240,
                                                                                                                                                                                                                                                            value: Int(
                                                                                                                                                                                                                                                                1,
                                                                                                                                                                                                                                                            ),
                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                    ),
                                                                                                                                                                                                                                                    op: Add,
                                                                                                                                                                                                                                                    right: NumberLiteral(
                                                                                                                                                                                                                                                        ExprNumberLiteral {
                                                                                                                                                                                                                                                            node_index: AtomicNodeIndex(..),
                                                                                                                                                                                                                                                            range: 241..242,
                                                                                                                                                                                                                                                            value: Int(
                                                                                                                                                                                                                                                                1,
                                                                                                                                                                                                                                                            ),
                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                    ),
                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                            ),
                                                                                                                                                                                                                                            debug_text: None,
                                                                                                                                                                                                                                            conversion: None,
                                                                                                                                                                                                                                            format_spec: None,
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    ),
                                                                                                                                                                                                                                ],
                                                                                                                                                                                                                                flags: TStringFlags {
                                                                                                                                                                                                                                    quote_style: Double,
                                                                                                                                                                                                                                    prefix: Regular,
                                                                                                                                                                                                                                    triple_quoted: false,
                                                                                                                                                                                                                                },
                                                                                                                                                                                                                            },
                                                                                                                                                                                                                        ),
                                                                                                                                                                                                                    ),
                                                                                                                                                                                                                },
                                                                                                                                                                                                            },
                                                                                                                                                                                                        ),
                                                                                                                                                                                                        debug_text: None,
                                                                                                                                                                                                        conversion: None,
                                                                                                                                                                                                        format_spec: None,
                                                                                                                                                                                                    },
                                                                                                                                                                                                ),
                                                                                                                                                                                            ],
                                                                                                                                                                                            flags: TStringFlags {
                                                                                                                                                                                                quote_style: Double,
                                                                                                                                                                                                prefix: Regular,
                                                                                                                                                                                                triple_quoted: false,
                                                                                                                                                                                            },
                                                                                                                                                                                        },
                                                                                                                                                                                    ),
                                                                                                                                                                                ),
                                                                                                                                                                            },
                                                                                                                                                                        },
                                                                                                                                                                    ),
                                                                                                                                                                    debug_text: None,
                                                                                                                                                                    conversion: None,
                                                                                                                                                                    format_spec: None,
                                                                                                                                                                },
                                                                                                                                                            ),
                                                                                                                                                        ],
                                                                                                                                                        flags: TStringFlags {
                                                                                                                                                            quote_style: Double,
                                                                                                                                                            prefix: Regular,
                                                                                                                                                            triple_quoted: false,
                                                                                                                                                        },
                                                                                                                                                    },
                                                                                                                                                ),
                                                                                                                                            ),
                                                                                                                                        },
                                                                                                                                    },
                                                                                                                                ),
                                                                                                                                debug_text: None,
                                                                                                                                conversion: None,
                                                                                                                                format_spec: None,
                                                                                                                            },
                                                                                                                        ),
                                                                                                                    ],
                                                                                                                    flags: TStringFlags {
                                                                                                                        quote_style: Double,
                                                                                                                        prefix: Regular,
                                                                                                                        triple_quoted: false,
                                                                                                                    },
                                                                                                                },
                                                                                                            ),
                                                                                                        ),
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            debug_text: None,
                                                                                            conversion: None,
                                                                                            format_spec: None,
                                                                                        },
                                                                                    ),
                                                                                ],
                                                                                flags: TStringFlags {
                                                                                    quote_style: Double,
                                                                                    prefix: Regular,
                                                                                    triple_quoted: false,
                                                                                },
                                                                            },
                                                                        ),
                                                                    ),
                                                                },
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: None,
                                                    },
                                                ),
                                            ],
                                            flags: TStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 276..310,
                    value: TString(
                        ExprTString {
                            node_index: AtomicNodeIndex(..),
                            range: 276..310,
                            value: TStringValue {
                                inner: Single(
                                    TString(
                                        TString {
                                            range: 276..310,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 278..303,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: TString(
                                                            ExprTString {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 279..302,
                                                                value: TStringValue {
                                                                    inner: Single(
                                                                        TString(
                                                                            TString {
                                                                                range: 279..302,
                                                                                node_index: AtomicNodeIndex(..),
                                                                                elements: [
                                                                                    Interpolation(
                                                                                        InterpolatedElement {
                                                                                            range: 283..293,
                                                                                            node_index: AtomicNodeIndex(..),
                                                                                            expression: StringLiteral(
                                                                                                ExprStringLiteral {
                                                                                                    node_index: AtomicNodeIndex(..),
                                                                                                    range: 284..292,
                                                                                                    value: StringLiteralValue {
                                                                                                        inner: Single(
                                                                                                            StringLiteral {
                                                                                                                range: 284..292,
                                                                                                                node_index: AtomicNodeIndex(..),
                                                                                                                value: "nested",
                                                                                                                flags: StringLiteralFlags {
                                                                                                                    quote_style: Double,
                                                                                                                    prefix: Empty,
                                                                                                                    triple_quoted: false,
                                                                                                                },
                                                                                                            },
                                                                                                        ),
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            debug_text: None,
                                                                                            conversion: None,
                                                                                            format_spec: None,
                                                                                        },
                                                                                    ),
                                                                                    Literal(
                                                                                        InterpolatedStringLiteralElement {
                                                                                            range: 293..299,
                                                                                            node_index: AtomicNodeIndex(..),
                                                                                            value: " inner",
                                                                                        },
                                                                                    ),
                                                                                ],
                                                                                flags: TStringFlags {
                                                                                    quote_style: Single,
                                                                                    prefix: Regular,
                                                                                    triple_quoted: true,
                                                                                },
                                                                            },
                                                                        ),
                                                                    ),
                                                                },
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: None,
                                                    },
                                                ),
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 303..309,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: " outer",
                                                    },
                                                ),
                                            ],
                                            flags: TStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 336..359,
                    value: TString(
                        ExprTString {
                            node_index: AtomicNodeIndex(..),
                            range: 336..359,
                            value: TStringValue {
                                inner: Single(
                                    TString(
                                        TString {
                                            range: 336..359,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 338..343,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: "test ",
                                                    },
                                                ),
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 343..353,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: Name(
                                                            ExprName {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 344..345,
                                                                id: Name("a"),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: None,
                                                    },
                                                ),
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 353..358,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: " more",
                                                    },
                                                ),
                                            ],
                                            flags: TStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
        ],
    },
)
```
