Skip to content

Conversation

@MeGaGiGaGon
Copy link
Contributor

@MeGaGiGaGon MeGaGiGaGon commented Jul 10, 2025

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:
image

The "References" section link is also updated to reflect the rule's actual behavior.

Test Plan

N/A, no functionality/tests affected

@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dscorbett
Copy link

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.

@MeGaGiGaGon
Copy link
Contributor Author

Sounds reasonable to me, the link was wrong in the first place since the lint doesn't check for all RTL chars.

@ntBre ntBre added the documentation Improvements or additions to documentation label Jul 11, 2025
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ntBre ntBre merged commit 7b27fe9 into astral-sh:main Jul 14, 2025
35 checks passed
@MeGaGiGaGon MeGaGiGaGon deleted the patch-1 branch July 14, 2025 19:07
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PLE2502 documentation does not match the implementation

3 participants