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

```
Module(
    ModModule {
        range: 0..61,
        body: [
            FunctionDef(
                StmtFunctionDef {
                    range: 0..28,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: "foo",
                        range: 4..7,
                    },
                    type_params: None,
                    parameters: Parameters {
                        range: 7..23,
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 8..9,
                                parameter: Parameter {
                                    range: 8..9,
                                    name: Identifier {
                                        id: "a",
                                        range: 8..9,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                        ],
                        vararg: Some(
                            Parameter {
                                range: 11..16,
                                name: Identifier {
                                    id: "args",
                                    range: 12..16,
                                },
                                annotation: None,
                            },
                        ),
                        kwonlyargs: [
                            ParameterWithDefault {
                                range: 21..22,
                                parameter: Parameter {
                                    range: 21..22,
                                    name: Identifier {
                                        id: "b",
                                        range: 21..22,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                        ],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                range: 25..28,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 25..28,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    range: 29..60,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: "foo",
                        range: 33..36,
                    },
                    type_params: None,
                    parameters: Parameters {
                        range: 36..55,
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 37..38,
                                parameter: Parameter {
                                    range: 37..38,
                                    name: Identifier {
                                        id: "a",
                                        range: 37..38,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                        ],
                        vararg: Some(
                            Parameter {
                                range: 40..45,
                                name: Identifier {
                                    id: "args",
                                    range: 41..45,
                                },
                                annotation: None,
                            },
                        ),
                        kwonlyargs: [
                            ParameterWithDefault {
                                range: 47..48,
                                parameter: Parameter {
                                    range: 47..48,
                                    name: Identifier {
                                        id: "b",
                                        range: 47..48,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                            ParameterWithDefault {
                                range: 50..51,
                                parameter: Parameter {
                                    range: 50..51,
                                    name: Identifier {
                                        id: "c",
                                        range: 50..51,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                        ],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                range: 57..60,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 57..60,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | def foo(a, *args, *, b): ...
  |                   ^ Syntax Error: Keyword-only parameter separator not allowed after '*' parameter
2 | def foo(a, *args, b, c, *): ...
  |


  |
1 | def foo(a, *args, *, b): ...
2 | def foo(a, *args, b, c, *): ...
  |                         ^ Syntax Error: Keyword-only parameter separator not allowed after '*' parameter
  |
