Skip to content

Comments

[SPARK-55621][PYTHON] Fix ambiguous and unnecessary unicode usage#54410

Open
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
gaogaotiantian:fix-ascii
Open

[SPARK-55621][PYTHON] Fix ambiguous and unnecessary unicode usage#54410
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
gaogaotiantian:fix-ascii

Conversation

@gaogaotiantian
Copy link
Contributor

@gaogaotiantian gaogaotiantian commented Feb 20, 2026

What changes were proposed in this pull request?

Fixed all the unnecessary and ambiguous unicode character usage.
A set of ruff rules are also added to prevent future regressions.

Why are the changes needed?

We should avoid using non-ascii unicode character usage as much as possible. There are few rationales behind it

  • Sometimes it's just wrong. e.g. ‘index’ vs 'index'
  • Some editor (VSCode) will highlight it as a warning and some editor/terminal might not display it well
  • It's difficult to keep consistency because people don't know how to type that
  • For docstrings, it could actually be displayed somewhere while users are using it and unicode could cause problems

Does this PR introduce any user-facing change?

No.

How was this patch tested?

ruff check passed.

Was this patch authored or co-authored using generative AI tooling?

No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant