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

```
Module(
    ModModule {
        range: 0..150,
        body: [
            TypeAlias(
                StmtTypeAlias {
                    range: 0..23,
                    name: Name(
                        ExprName {
                            range: 5..10,
                            id: Name("Alias"),
                            ctx: Store,
                        },
                    ),
                    type_params: Some(
                        TypeParams {
                            range: 10..13,
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 11..12,
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 11..12,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    value: Subscript(
                        ExprSubscript {
                            range: 16..23,
                            value: Name(
                                ExprName {
                                    range: 16..20,
                                    id: Name("list"),
                                    ctx: Load,
                                },
                            ),
                            slice: Name(
                                ExprName {
                                    range: 21..22,
                                    id: Name("T"),
                                    ctx: Load,
                                },
                            ),
                            ctx: Load,
                        },
                    ),
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    range: 24..43,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("f"),
                        range: 28..29,
                    },
                    type_params: Some(
                        TypeParams {
                            range: 29..32,
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 30..31,
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 30..31,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 32..38,
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 33..37,
                                parameter: Parameter {
                                    range: 33..37,
                                    name: Identifier {
                                        id: Name("t"),
                                        range: 33..34,
                                    },
                                    annotation: Some(
                                        Name(
                                            ExprName {
                                                range: 36..37,
                                                id: Name("T"),
                                                ctx: Load,
                                            },
                                        ),
                                    ),
                                },
                                default: None,
                            },
                        ],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                range: 40..43,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 40..43,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            ClassDef(
                StmtClassDef {
                    range: 44..59,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("C"),
                        range: 50..51,
                    },
                    type_params: Some(
                        TypeParams {
                            range: 51..54,
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 52..53,
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 52..53,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    arguments: None,
                    body: [
                        Expr(
                            StmtExpr {
                                range: 56..59,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 56..59,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            ClassDef(
                StmtClassDef {
                    range: 60..81,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("C"),
                        range: 66..67,
                    },
                    type_params: Some(
                        TypeParams {
                            range: 67..76,
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 68..69,
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 68..69,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 71..72,
                                        name: Identifier {
                                            id: Name("U"),
                                            range: 71..72,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 74..75,
                                        name: Identifier {
                                            id: Name("V"),
                                            range: 74..75,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    arguments: None,
                    body: [
                        Expr(
                            StmtExpr {
                                range: 78..81,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 78..81,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            TypeAlias(
                StmtTypeAlias {
                    range: 82..149,
                    name: Name(
                        ExprName {
                            range: 87..92,
                            id: Name("Alias"),
                            ctx: Store,
                        },
                    ),
                    type_params: Some(
                        TypeParams {
                            range: 92..143,
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 93..94,
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 93..94,
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 96..102,
                                        name: Identifier {
                                            id: Name("U"),
                                            range: 96..97,
                                        },
                                        bound: Some(
                                            Name(
                                                ExprName {
                                                    range: 99..102,
                                                    id: Name("str"),
                                                    ctx: Load,
                                                },
                                            ),
                                        ),
                                        default: None,
                                    },
                                ),
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 104..119,
                                        name: Identifier {
                                            id: Name("V"),
                                            range: 104..105,
                                        },
                                        bound: Some(
                                            Tuple(
                                                ExprTuple {
                                                    range: 107..119,
                                                    elts: [
                                                        Name(
                                                            ExprName {
                                                                range: 108..111,
                                                                id: Name("str"),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                        Name(
                                                            ExprName {
                                                                range: 113..118,
                                                                id: Name("bytes"),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                    ],
                                                    ctx: Load,
                                                    parenthesized: true,
                                                },
                                            ),
                                        ),
                                        default: None,
                                    },
                                ),
                                TypeVarTuple(
                                    TypeParamTypeVarTuple {
                                        range: 121..124,
                                        name: Identifier {
                                            id: Name("Ts"),
                                            range: 122..124,
                                        },
                                        default: None,
                                    },
                                ),
                                ParamSpec(
                                    TypeParamParamSpec {
                                        range: 126..129,
                                        name: Identifier {
                                            id: Name("P"),
                                            range: 128..129,
                                        },
                                        default: None,
                                    },
                                ),
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 131..142,
                                        name: Identifier {
                                            id: Name("D"),
                                            range: 131..132,
                                        },
                                        bound: None,
                                        default: Some(
                                            Name(
                                                ExprName {
                                                    range: 135..142,
                                                    id: Name("default"),
                                                    ctx: Load,
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    value: EllipsisLiteral(
                        ExprEllipsisLiteral {
                            range: 146..149,
                        },
                    ),
                },
            ),
        ],
    },
)
```
