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

[refurb] Guard hashlib imports and mark hashlib-digest-hex fix as safe (FURB181) #14694

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

sbrugman
Copy link
Contributor

Summary

  • Check if hashlib and crypt imports have been seen for FURB181 and S324
  • Mark the fix for FURB181 as safe: I think it was accidentally marked as unsafe in the first place. The rule does not support user-defined classes as the "fix safety" section suggests.
  • Removed hashlib._Hash, as it's not part of the hashlib module.

Test Plan

Updated the test snapshots

Copy link
Contributor

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.

This makes sense, thanks.

@charliermarsh charliermarsh merged commit 48ec3a8 into astral-sh:main Dec 2, 2024
21 checks passed
@charliermarsh charliermarsh added the fixes Related to suggested fixes for violations label Dec 2, 2024
@sbrugman sbrugman deleted the hashlib-digest-hex-safe branch December 2, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants