[pylint] Make example error out-of-the-box (PLE2502)#19272
Merged
ntBre merged 3 commits intoastral-sh:mainfrom Jul 14, 2025
Merged
[pylint] Make example error out-of-the-box (PLE2502)#19272ntBre merged 3 commits intoastral-sh:mainfrom
pylint] Make example error out-of-the-box (PLE2502)#19272ntBre merged 3 commits intoastral-sh:mainfrom
Conversation
Contributor
|
|
The PEP 672 link in the “References” section should be updated to point to Bidirectional Marks, Embeddings, Overrides and Isolates, where the new example originates, instead of Bidirectional Text. “unicode” should be written “Unicode” throughput this rule’s documentation, or deleted as redundant because all characters in Python are Unicode characters. |
Contributor
Author
|
Sounds reasonable to me, the link was wrong in the first place since the lint doesn't check for all RTL chars. |
dscorbett
reviewed
Jul 11, 2025
crates/ruff_linter/src/rules/pylint/rules/bidirectional_unicode.rs
Outdated
Show resolved
Hide resolved
dcreager
added a commit
that referenced
this pull request
Jul 15, 2025
* main: [`pylint`] Extend invalid string character rules to include t-strings (#19355) Make TC010 docs example more realistic (#19356) Move RDJSON rendering to `ruff_db` (#19293) [`flake8-use-pathlib`] Skip single dots for `invalid-pathlib-with-suffix` (`PTH210`) on versions >= 3.14 (#19331) [`ruff`] Allow `strict` kwarg when checking for `starmap-zip` (`RUF058`) in Python 3.14+ (#19333) [ty] Reduce false positives for `TypedDict` types (#19354) [ty] Remove `ConnectionInitializer` (#19353) [ty] Use `Type::string_literal()` more (#19352) [ty] Add ecosystem-report workflow (#19349) [ty] Make use of salsa `Lookup` when interning values (#19347) [ty] Sync vendored typeshed stubs (#19345) [`pylint`] Make example error out-of-the-box (`PLE2502`) (#19272) [`pydoclint`] Fix `SyntaxError` from fixes with line continuations (`D201`, `D202`) (#19246)
dcreager
added a commit
that referenced
this pull request
Jul 15, 2025
* dcreager/merge-arguments: add types iterator add asserting constructor debug assert lengths remove unused From use FromIterator [`pylint`] Extend invalid string character rules to include t-strings (#19355) Make TC010 docs example more realistic (#19356) Move RDJSON rendering to `ruff_db` (#19293) [`flake8-use-pathlib`] Skip single dots for `invalid-pathlib-with-suffix` (`PTH210`) on versions >= 3.14 (#19331) [`ruff`] Allow `strict` kwarg when checking for `starmap-zip` (`RUF058`) in Python 3.14+ (#19333) [ty] Reduce false positives for `TypedDict` types (#19354) [ty] Remove `ConnectionInitializer` (#19353) [ty] Use `Type::string_literal()` more (#19352) [ty] Add ecosystem-report workflow (#19349) [ty] Make use of salsa `Lookup` when interning values (#19347) [ty] Sync vendored typeshed stubs (#19345) [`pylint`] Make example error out-of-the-box (`PLE2502`) (#19272) [`pydoclint`] Fix `SyntaxError` from fixes with line continuations (`D201`, `D202`) (#19246)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #18972
Fixes #14346
This PR makes bidirectional-unicode (PLE2502)'s example error out-of-the-box, by converting it to use one of the test cases. The documentation in general is also updated to replace "bidirectional unicode character" with "bidirectional formatting character", as those are the only ones checked for, and the "unicode" suffix is redundant. The new example section looks like this:

The "References" section link is also updated to reflect the rule's actual behavior.
Test Plan
N/A, no functionality/tests affected