Repository navigation
Use the Ruff fork 0.17.1 for CPython syntax error messages and the obsolete '<>' hint - #9212
Conversation
…kind - The ruff crates come from the RustPython/ruff `rustpython-0.17.1` branch at 93967836c8 instead of the 0.16.10 crates.io release. - `EofToken.known_location` is replaced by `EofErrorLocation` (Tokenizer, Token, StartingFromToken), chosen from the parse error kind. The keyword scan in `clause_keyword` is removed, since the parser now reports a forced `:` as `ExpectedForcedToken`. - An empty import at EOF ends at the end of the line read, and an empty import before a newline is an empty range at the newline. Assisted-by: Claude Code:claude-opus-5-5
- Bump the RustPython/ruff fork to 9290a88495, where the parser reports an adjacent `<` and `>` in a comparison as "invalid syntax. Maybe you meant '!=' instead of '<>'?" over both tokens. - Outside Barry mode, `BarrySource` no longer searches the source text for `<>`, so the parser's error is reported unchanged. A `<>` that starts a statement is reported at the `<` only, and `<<>` at the `>`. Assisted-by: Claude Code:claude-opus-5-5
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
rustpython-0.17.1branch by git rev, not from crates.io. That branch is ruff 0.17.1 with the RustPython fork patches on top. The crates are not published yet.:afterdef/try/finally/elsereports "expected ':'".raise from/raise x fromreport thedid you forget an expression ...messages.async+ other token, decorator without definition, missing module orasname, andwithwithout items report "invalid syntax".withtrailing comma messages are added.<>in a comparison reports "invalid syntax. Maybe you meant '!=' instead of '<>'?" (invalid_noteq).EofErrorLocation). The keyword scan that guessed forced tokens is removed.BarrySourceno longer searches the source text for<>. The parser's error is used unchanged, so2 <<> 3is no longer matched. This covers the parser-owned approach discussed in Match obsolete comparison diagnostics #9074.Testing
cargo clippy --workspace --all-targets(with the usual excludes): no new warnings.cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --exclude rustpython-capi(cd crates/capi && cargo test)rustpython -m test --dont-add-python-opts: 37 modules passed, including test_syntax, test_codeop, test_repl, test_grammar, test_exceptions, test_compile, test_ast, test_tokenize, test_eof and test_flufl.AI assistance
Written with Claude Code (claude-opus-5-5).
🤖 Generated with Claude Code
Summary by CodeRabbit
<>operator, with clearer error spans and a “Maybe you meant” hint for comparisons.<>handling is now limited to Barry mode.