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

Prevent invalid utf8 indexing in cell magic detection #9146

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

konstin
Copy link
Member

@konstin konstin commented Dec 15, 2023

The example below used to panic because we tried to split at 2 bytes in the 4-bytes character .

def sample_func(xx):
    """
    转置 (transpose)
    """
    return xx.T

Fixes #9145
Fixes astral-sh/ruff-vscode#362

The second commit is a small test refactoring.

@konstin konstin requested a review from dhruvmanila December 15, 2023 09:19
Copy link
Contributor

github-actions bot commented Dec 15, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@dhruvmanila dhruvmanila left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Panic] byte index 2 is not a char boundary Ruff: Lint failed (error: Ruff crashed)
3 participants