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

```
Module(
    ModModule {
        range: 0..47,
        body: [
            FunctionDef(
                StmtFunctionDef {
                    range: 0..39,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("foo"),
                        range: 4..7,
                    },
                    type_params: Some(
                        TypeParams {
                            range: 7..15,
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 8..10,
                                        name: Identifier {
                                            id: Name("T1"),
                                            range: 8..10,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                                TypeVarTuple(
                                    TypeParamTypeVarTuple {
                                        range: 12..15,
                                        name: Identifier {
                                            id: Name("T2"),
                                            range: 13..15,
                                        },
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 15..21,
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 16..17,
                                parameter: Parameter {
                                    range: 16..17,
                                    name: Identifier {
                                        id: Name("a"),
                                        range: 16..17,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                            ParameterWithDefault {
                                range: 19..20,
                                parameter: Parameter {
                                    range: 19..20,
                                    name: Identifier {
                                        id: Name("b"),
                                        range: 19..20,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                        ],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Return(
                            StmtReturn {
                                range: 27..39,
                                value: Some(
                                    BinOp(
                                        ExprBinOp {
                                            range: 34..39,
                                            left: Name(
                                                ExprName {
                                                    range: 34..35,
                                                    id: Name("a"),
                                                    ctx: Load,
                                                },
                                            ),
                                            op: Add,
                                            right: Name(
                                                ExprName {
                                                    range: 38..39,
                                                    id: Name("b"),
                                                    ctx: Load,
                                                },
                                            ),
                                        },
                                    ),
                                ),
                            },
                        ),
                    ],
                },
            ),
            Assign(
                StmtAssign {
                    range: 40..46,
                    targets: [
                        Name(
                            ExprName {
                                range: 40..41,
                                id: Name("x"),
                                ctx: Store,
                            },
                        ),
                    ],
                    value: NumberLiteral(
                        ExprNumberLiteral {
                            range: 44..46,
                            value: Int(
                                10,
                            ),
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | def foo[T1, *T2(a, b):
  |                ^ Syntax Error: Expected ']', found '('
2 |     return a + b
3 | x = 10
  |
