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

```
Module(
    ModModule {
        range: 0..27,
        body: [
            AugAssign(
                StmtAugAssign {
                    range: 0..4,
                    target: Name(
                        ExprName {
                            range: 0..1,
                            id: Name("x"),
                            ctx: Store,
                        },
                    ),
                    op: Add,
                    value: Name(
                        ExprName {
                            range: 4..4,
                            id: Name(""),
                            ctx: Invalid,
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    range: 5..10,
                    value: BinOp(
                        ExprBinOp {
                            range: 5..10,
                            left: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 5..6,
                                    value: Int(
                                        1,
                                    ),
                                },
                            ),
                            op: Add,
                            right: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 9..10,
                                    value: Int(
                                        1,
                                    ),
                                },
                            ),
                        },
                    ),
                },
            ),
            AugAssign(
                StmtAugAssign {
                    range: 11..17,
                    target: Name(
                        ExprName {
                            range: 11..12,
                            id: Name("x"),
                            ctx: Store,
                        },
                    ),
                    op: Add,
                    value: Name(
                        ExprName {
                            range: 16..17,
                            id: Name("y"),
                            ctx: Load,
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    range: 21..26,
                    value: BinOp(
                        ExprBinOp {
                            range: 21..26,
                            left: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 21..22,
                                    value: Int(
                                        2,
                                    ),
                                },
                            ),
                            op: Add,
                            right: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 25..26,
                                    value: Int(
                                        2,
                                    ),
                                },
                            ),
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | x +=
  |     ^ Syntax Error: Expected an expression
2 | 1 + 1
3 | x += y +=
4 | 2 + 2
  |


  |
1 | x +=
2 | 1 + 1
3 | x += y +=
  |        ^^ Syntax Error: Expected a statement
4 | 2 + 2
  |


  |
1 | x +=
2 | 1 + 1
3 | x += y +=
  |          ^ Syntax Error: Expected a statement
4 | 2 + 2
  |
