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

```
Module(
    ModModule {
        range: 0..24,
        body: [
            Import(
                StmtImport {
                    range: 0..6,
                    names: [],
                },
            ),
            Expr(
                StmtExpr {
                    range: 7..8,
                    value: Starred(
                        ExprStarred {
                            range: 7..8,
                            value: Name(
                                ExprName {
                                    range: 8..8,
                                    id: Name(""),
                                    ctx: Invalid,
                                },
                            ),
                            ctx: Load,
                        },
                    ),
                },
            ),
            Import(
                StmtImport {
                    range: 9..18,
                    names: [
                        Alias {
                            range: 16..17,
                            name: Identifier {
                                id: Name("x"),
                                range: 16..17,
                            },
                            asname: None,
                        },
                    ],
                },
            ),
            Expr(
                StmtExpr {
                    range: 19..23,
                    value: Tuple(
                        ExprTuple {
                            range: 19..23,
                            elts: [
                                Starred(
                                    ExprStarred {
                                        range: 19..20,
                                        value: Name(
                                            ExprName {
                                                range: 20..20,
                                                id: Name(""),
                                                ctx: Invalid,
                                            },
                                        ),
                                        ctx: Load,
                                    },
                                ),
                                Name(
                                    ExprName {
                                        range: 22..23,
                                        id: Name("y"),
                                        ctx: Load,
                                    },
                                ),
                            ],
                            ctx: Load,
                            parenthesized: false,
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | import *
  |        ^ Syntax Error: Expected one or more symbol names after import
2 | import x, *, y
  |


  |
1 | import *
  |         ^ Syntax Error: Expected an expression
2 | import x, *, y
  |


  |
1 | import *
2 | import x, *, y
  |         ^ Syntax Error: Trailing comma not allowed
  |


  |
1 | import *
2 | import x, *, y
  |           ^ Syntax Error: Simple statements must be separated by newlines or semicolons
  |


  |
1 | import *
2 | import x, *, y
  |            ^ Syntax Error: Expected an expression
  |
