rustpython-ruff_python_parser 0.15.8

Unofficial fork for RustPython
Documentation
---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/inline/ok/duplicate_match_key_attr.py
---
## AST

```
Module(
    ModModule {
        node_index: NodeIndex(None),
        range: 0..40,
        body: [
            Match(
                StmtMatch {
                    node_index: NodeIndex(None),
                    range: 0..39,
                    subject: Name(
                        ExprName {
                            node_index: NodeIndex(None),
                            range: 6..7,
                            id: Name("x"),
                            ctx: Load,
                        },
                    ),
                    cases: [
                        MatchCase {
                            range: 13..39,
                            node_index: NodeIndex(None),
                            pattern: MatchMapping(
                                PatternMatchMapping {
                                    node_index: NodeIndex(None),
                                    range: 18..34,
                                    keys: [
                                        Attribute(
                                            ExprAttribute {
                                                node_index: NodeIndex(None),
                                                range: 19..22,
                                                value: Name(
                                                    ExprName {
                                                        node_index: NodeIndex(None),
                                                        range: 19..20,
                                                        id: Name("x"),
                                                        ctx: Load,
                                                    },
                                                ),
                                                attr: Identifier {
                                                    id: Name("a"),
                                                    range: 21..22,
                                                    node_index: NodeIndex(None),
                                                },
                                                ctx: Load,
                                            },
                                        ),
                                        Attribute(
                                            ExprAttribute {
                                                node_index: NodeIndex(None),
                                                range: 27..30,
                                                value: Name(
                                                    ExprName {
                                                        node_index: NodeIndex(None),
                                                        range: 27..28,
                                                        id: Name("x"),
                                                        ctx: Load,
                                                    },
                                                ),
                                                attr: Identifier {
                                                    id: Name("a"),
                                                    range: 29..30,
                                                    node_index: NodeIndex(None),
                                                },
                                                ctx: Load,
                                            },
                                        ),
                                    ],
                                    patterns: [
                                        MatchValue(
                                            PatternMatchValue {
                                                node_index: NodeIndex(None),
                                                range: 24..25,
                                                value: NumberLiteral(
                                                    ExprNumberLiteral {
                                                        node_index: NodeIndex(None),
                                                        range: 24..25,
                                                        value: Int(
                                                            1,
                                                        ),
                                                    },
                                                ),
                                            },
                                        ),
                                        MatchValue(
                                            PatternMatchValue {
                                                node_index: NodeIndex(None),
                                                range: 32..33,
                                                value: NumberLiteral(
                                                    ExprNumberLiteral {
                                                        node_index: NodeIndex(None),
                                                        range: 32..33,
                                                        value: Int(
                                                            2,
                                                        ),
                                                    },
                                                ),
                                            },
                                        ),
                                    ],
                                    rest: None,
                                },
                            ),
                            guard: None,
                            body: [
                                Expr(
                                    StmtExpr {
                                        node_index: NodeIndex(None),
                                        range: 36..39,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                node_index: NodeIndex(None),
                                                range: 36..39,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                    ],
                },
            ),
        ],
    },
)
```