Skip to content

[E721] Flag comparisons to memoryview#8485

Merged
charliermarsh merged 2 commits intoastral-sh:mainfrom
qdegraaf:feat/E721memoryview
Nov 4, 2023
Merged

[E721] Flag comparisons to memoryview#8485
charliermarsh merged 2 commits intoastral-sh:mainfrom
qdegraaf:feat/E721memoryview

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

@github-actions
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:33
@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
@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