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

[E721] Flag comparisons to memoryview #8485

Merged
merged 2 commits into from
Nov 4, 2023

Conversation

qdegraaf
Copy link
Contributor

@qdegraaf qdegraaf commented Nov 4, 2023

Summary

Adds memoryview to the list of typeclasses that fn is_type() uses for type comparison checks so that it raises a violation if is, is not or isinstance() are not used.

Test Plan

Added examples to existing fixture

Issue Link

Closes: #8483

Copy link
Contributor

github-actions bot commented Nov 4, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh enabled auto-merge (squash) November 4, 2023 13:34
@charliermarsh charliermarsh added the bug Something isn't working label Nov 4, 2023
@charliermarsh charliermarsh merged commit 75c9be0 into astral-sh:main Nov 4, 2023
16 checks passed
@qdegraaf qdegraaf deleted the feat/E721memoryview branch November 4, 2023 14:28
hauntsaninja added a commit to hauntsaninja/ruff that referenced this pull request Nov 5, 2023
See astral-sh#8483. Generalised fix on top of astral-sh#8485

Based on the output of `print("\n".join(k for k, v in
builtins.__dict__.items() if isinstance(v, type)))`
charliermarsh pushed a commit that referenced this pull request Nov 6, 2023
See #8483. Generalised fix on top of #8485

Based on the output of `print("\n".join(k for k, v in
builtins.__dict__.items() if isinstance(v, type)))`
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.

E721 and memoryview
2 participants