Title: Use the Ruff fork 0.17.1 for CPython syntax error messages and the obsolete '<>' hint by youknowone · Pull Request #9212 · RustPython/RustPython · GitHub
Open Graph Title: Use the Ruff fork 0.17.1 for CPython syntax error messages and the obsolete '<>' hint by youknowone · Pull Request #9212 · RustPython/RustPython
X Title: Use the Ruff fork 0.17.1 for CPython syntax error messages and the obsolete '<>' hint by youknowone · Pull Request #9212 · RustPython/RustPython
Description: Summary The ruff crates come from the RustPython/ruff rustpython-0.17.1 branch 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. Fork changes used here: A forced : after def/try/finally/else reports "expected ':'". raise from / raise x from report the did you forget an expression ... messages. Empty del/global/nonlocal, async + other token, decorator without definition, missing module or as name, and with without items report "invalid syntax". The import and with trailing comma messages are added. An adjacent < > in a comparison reports "invalid syntax. Maybe you meant '!=' instead of '<>'?" (invalid_noteq). The compiler places an error on the token made up at the end of the input according to the error kind (EofErrorLocation). The keyword scan that guessed forced tokens is removed. Outside Barry mode, BarrySource no longer searches the source text for <>. The parser's error is used unchanged, so 2 <<> 3 is no longer matched. This covers the parser-owned approach discussed in #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 Bug Fixes Improved the locations shown for syntax errors at the end of a file, including errors involving missing tokens, empty imports, and invalid syntax. Empty-import diagnostics now retain the parser’s reported range. Improved guidance for the obsolete <> operator, with clearer error spans and a “Maybe you meant” hint for comparisons. Legacy <> handling is now limited to Barry mode.
Open Graph Description: Summary The ruff crates come from the RustPython/ruff rustpython-0.17.1 branch by git rev, not from crates.io. That branch is ruff 0.17.1 with the RustPython fork patches on top. The crates are no...
X Description: Summary The ruff crates come from the RustPython/ruff rustpython-0.17.1 branch by git rev, not from crates.io. That branch is ruff 0.17.1 with the RustPython fork patches on top. The crates are no...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9212
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:96d71d81-a4e4-f03f-508a-e85f92769d2c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D524:29FFA9:39944F9:48E8A16:6B01F3B4 |
| html-safe-nonce | 16db7e36c72a57865bef7cdde7aa0d53d0280a5f4dae8c616c68007aa5c4c2ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTI0OjI5RkZBOTozOTk0NEY5OjQ4RThBMTY6NkIwMUYzQjQiLCJ2aXNpdG9yX2lkIjoiNTAyMTQ0MTM4NzkxMzE0NzMxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a600fae18398647b8cbb897d65b5b90d30777930577ec746a17074512bccfdba |
| hovercard-subject-tag | pull_request:4920470801 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9212/files |
| twitter:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| og:image:alt | Summary The ruff crates come from the RustPython/ruff rustpython-0.17.1 branch by git rev, not from crates.io. That branch is ruff 0.17.1 with the RustPython fork patches on top. The crates are no... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width