mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Recognize numeric Expr::Constant values when validating signed literal patterns, alongside parser-produced NumberLiteral nodes. Python AST conversion uses the former representation. Accept unary plus as well as minus and fold signed real/imaginary and complex patterns consistently. Boolean and non-numeric constants remain excluded. Preserve the existing parser-produced literal path and do not change source grammar. Assisted-by: OpenAI Codex:model-version-unavailable