Skip to content

[refurb] Implement hashlib-digest-hex (FURB181)#9077

Merged
charliermarsh merged 3 commits intoastral-sh:mainfrom
sbrugman:refurb-hexdigest
Dec 10, 2023
Merged

[refurb] Implement hashlib-digest-hex (FURB181)#9077
charliermarsh merged 3 commits intoastral-sh:mainfrom
sbrugman:refurb-hexdigest

Conversation

@sbrugman
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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.

2 participants