---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/invalid/expressions/arguments/duplicate_keyword_arguments.py
---
## AST

```
Module(
    ModModule {
        node_index: AtomicNodeIndex(..),
        range: 0..28,
        body: [
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 0..28,
                    value: Call(
                        ExprCall {
                            node_index: AtomicNodeIndex(..),
                            range: 0..28,
                            func: Name(
                                ExprName {
                                    node_index: AtomicNodeIndex(..),
                                    range: 0..3,
                                    id: Name("foo"),
                                    ctx: Load,
                                },
                            ),
                            arguments: Arguments {
                                range: 3..28,
                                node_index: AtomicNodeIndex(..),
                                args: [],
                                keywords: [
                                    Keyword {
                                        range: 4..7,
                                        node_index: AtomicNodeIndex(..),
                                        arg: Some(
                                            Identifier {
                                                id: Name("a"),
                                                range: 4..5,
                                                node_index: AtomicNodeIndex(..),
                                            },
                                        ),
                                        value: NumberLiteral(
                                            ExprNumberLiteral {
                                                node_index: AtomicNodeIndex(..),
                                                range: 6..7,
                                                value: Int(
                                                    1,
                                                ),
                                            },
                                        ),
                                    },
                                    Keyword {
                                        range: 9..12,
                                        node_index: AtomicNodeIndex(..),
                                        arg: Some(
                                            Identifier {
                                                id: Name("b"),
                                                range: 9..10,
                                                node_index: AtomicNodeIndex(..),
                                            },
                                        ),
                                        value: NumberLiteral(
                                            ExprNumberLiteral {
                                                node_index: AtomicNodeIndex(..),
                                                range: 11..12,
                                                value: Int(
                                                    2,
                                                ),
                                            },
                                        ),
                                    },
                                    Keyword {
                                        range: 14..17,
                                        node_index: AtomicNodeIndex(..),
                                        arg: Some(
                                            Identifier {
                                                id: Name("c"),
                                                range: 14..15,
                                                node_index: AtomicNodeIndex(..),
                                            },
                                        ),
                                        value: NumberLiteral(
                                            ExprNumberLiteral {
                                                node_index: AtomicNodeIndex(..),
                                                range: 16..17,
                                                value: Int(
                                                    3,
                                                ),
                                            },
                                        ),
                                    },
                                    Keyword {
                                        range: 19..22,
                                        node_index: AtomicNodeIndex(..),
                                        arg: Some(
                                            Identifier {
                                                id: Name("b"),
                                                range: 19..20,
                                                node_index: AtomicNodeIndex(..),
                                            },
                                        ),
                                        value: NumberLiteral(
                                            ExprNumberLiteral {
                                                node_index: AtomicNodeIndex(..),
                                                range: 21..22,
                                                value: Int(
                                                    4,
                                                ),
                                            },
                                        ),
                                    },
                                    Keyword {
                                        range: 24..27,
                                        node_index: AtomicNodeIndex(..),
                                        arg: Some(
                                            Identifier {
                                                id: Name("a"),
                                                range: 24..25,
                                                node_index: AtomicNodeIndex(..),
                                            },
                                        ),
                                        value: NumberLiteral(
                                            ExprNumberLiteral {
                                                node_index: AtomicNodeIndex(..),
                                                range: 26..27,
                                                value: Int(
                                                    5,
                                                ),
                                            },
                                        ),
                                    },
                                ],
                            },
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | foo(a=1, b=2, c=3, b=4, a=5)
  |                    ^^^ Syntax Error: Duplicate keyword argument "b"
  |


  |
1 | foo(a=1, b=2, c=3, b=4, a=5)
  |                         ^^^ Syntax Error: Duplicate keyword argument "a"
  |
