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

Favor OrderedSet().as_list() #447

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

jrycw
Copy link
Collaborator

@jrycw jrycw commented Sep 17, 2024

Related to #407.

It appears that both list(OrderedSet()) and unpacking OrderedSet() rely on the __iter__() method. I’d like to suggest using OrderedSet().as_list() instead of depending on the dunder method, as this approach is clearer and more stable, even though the implementation is unlikely to change.

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.75%. Comparing base (ea03bbc) to head (029ffb0).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #447   +/-   ##
=======================================
  Coverage   86.75%   86.75%           
=======================================
  Files          42       42           
  Lines        4702     4702           
=======================================
  Hits         4079     4079           
  Misses        623      623           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@machow machow self-requested a review September 17, 2024 13:17
Copy link
Collaborator

@machow machow left a comment

Choose a reason for hiding this comment

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

Seems reasonable, thanks for such a steady stream of improvements 😄

@machow
Copy link
Collaborator

machow commented Sep 17, 2024

@rich-iannone do you want to merge?

@rich-iannone rich-iannone merged commit fedac08 into posit-dev:main Sep 17, 2024
13 checks passed
@jrycw jrycw deleted the OrderedSet-as-list branch September 18, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants