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] Implement hashlib-digest-hex (FURB181) #9077

Merged
merged 3 commits into from Dec 10, 2023

Conversation

sbrugman
Copy link
Contributor

@sbrugman sbrugman commented Dec 9, 2023

Summary

Implementation of Refurb FURB181
Part of #1348

Test Plan

Test cases from Refurb

@sbrugman sbrugman changed the title Implement Refurb FURB181 [refurb] Implement hashlib-digest-hex (FURB181) Dec 9, 2023
Copy link
Contributor

github-actions bot commented Dec 9, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.


# not yet supported
h = sha256()
h.digest().hex()
Copy link
Member

Choose a reason for hiding this comment

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

It's not-impossible for us to detect this, you could look at what we do in TRIO115 where we map from name to value. There's also a general utility in draft here (#8583), but not merged. Either way, not a requirement for merging, just making a mental note for myself if anything.

Copy link
Contributor Author

@sbrugman sbrugman Dec 9, 2023

Choose a reason for hiding this comment

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

Interesting, nice utility. Would be good to revisit once that PR is merged!

For myself, I took this easy rule to get back at ruff developing after a while. I'm keen to go the more challenging implementation of using the fluid interface (dosisod/refurb#286). This impacts a lot of data engineering (e.g. spark) and data science (pytorch etc.) code I see come by.

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) December 10, 2023 01:54
@charliermarsh charliermarsh added rule Implementing or modifying a lint rule preview Related to preview mode features labels Dec 10, 2023
@charliermarsh charliermarsh merged commit 6e36dcf into astral-sh:main Dec 10, 2023
16 checks passed
@sbrugman sbrugman deleted the refurb-hexdigest branch December 10, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants