Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use characters instead of u32 in confusable map #8463

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

charliermarsh
Copy link
Member

No description provided.

@charliermarsh charliermarsh added the internal An internal refactor or improvement label Nov 3, 2023
@charliermarsh
Copy link
Member Author

I don't feel strongly about this but it came up once before. Sadly it really buffs my commit stats.

@@ -163,7 +163,7 @@ pub(crate) fn ambiguous_unicode_character(
let candidate = Candidate::new(
TextSize::try_from(relative_offset).unwrap() + range.start(),
current_char,
char::from_u32(representant).unwrap(),
representant,
Copy link
Member Author

Choose a reason for hiding this comment

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

The motivation for doing this now is that we can avoid this unwrap.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

I like being explicit about type.

Copy link
Contributor

github-actions bot commented Nov 3, 2023

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+9 -0 violations, +0 -0 fixes in 41 projects)

bokeh/bokeh (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --select ALL

+ examples/interaction/tools/subcoordinates_zoom.py:22:23: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?

pandas-dev/pandas (+6 -0 violations, +0 -0 fixes)

+ pandas/_libs/tslibs/timedeltas.pyi:58:6: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/core/indexes/base.py:5352:26: RUF003 Comment contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/core/indexes/base.py:5353:46: RUF003 Comment contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/core/indexes/base.py:5354:69: RUF003 Comment contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/tests/io/test_clipboard.py:67:34: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/tests/scalar/timedelta/test_constructors.py:306:25: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?

zulip/zulip (+2 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --select ALL

+ zerver/tests/test_invite.py:1281:32: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ zerver/tests/test_signup.py:1021:29: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
RUF001 6 6 0 0 0
RUF003 3 3 0 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+9 -0 violations, +0 -0 fixes in 41 projects)

bokeh/bokeh (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --select ALL --preview

+ examples/interaction/tools/subcoordinates_zoom.py:22:23: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?

pandas-dev/pandas (+6 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ pandas/_libs/tslibs/timedeltas.pyi:58:6: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/core/indexes/base.py:5352:26: RUF003 Comment contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/core/indexes/base.py:5353:46: RUF003 Comment contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/core/indexes/base.py:5354:69: RUF003 Comment contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/tests/io/test_clipboard.py:67:34: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ pandas/tests/scalar/timedelta/test_constructors.py:306:25: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?

zulip/zulip (+2 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --select ALL --preview

+ zerver/tests/test_invite.py:1281:32: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?
+ zerver/tests/test_signup.py:1021:29: RUF001 String contains ambiguous `µ` (MICRO SIGN). Did you mean `μ` (GREEK SMALL LETTER MU)?

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
RUF001 6 6 0 0 0
RUF003 3 3 0 0 0

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh charliermarsh merged commit 7c12eaf into main Nov 3, 2023
17 checks passed
@charliermarsh charliermarsh deleted the charlie/chars branch November 3, 2023 13:57
@zanieb
Copy link
Member

zanieb commented Nov 3, 2023

@charliermarsh why did this cause ecosystem changes?

@charliermarsh
Copy link
Member Author

@zanieb - I think those are incorrect -- those are from #4430 which I tagged you on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants