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

Remove useless reorder(nil) call in tootctl statuses #28141

Merged

Conversation

mjankowski
Copy link
Contributor

Adds a well named private method instead of the scope local variable, and removes a reorder that I must have missed in the recent MediaAttachment default_scope PR.

@renchap renchap added refactoring Improving code quality ruby Pull requests that update Ruby code labels Nov 30, 2023
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

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

I don't think it's worth creating a new method for this. What about just renaming scope to aged_media_attachments?

@mjankowski mjankowski force-pushed the cli-scope-statuses-media-attachment branch from 4118248 to 159a35f Compare December 6, 2023 18:39
@mjankowski
Copy link
Contributor Author

I don't think it's worth creating a new method for this. What about just renaming scope to aged_media_attachments?

Eh - for me most of the benefit (marginal, I would agree!) is in getting rid of the local var.

Updated to be just a removal of the unneeded reorder, can revisit method extraction later.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (af66d3d) 83.18% compared to head (159a35f) 83.18%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #28141   +/-   ##
=======================================
  Coverage   83.18%   83.18%           
=======================================
  Files        1038     1038           
  Lines       28220    28220           
  Branches     4550     4550           
=======================================
  Hits        23475    23475           
  Misses       3635     3635           
  Partials     1110     1110           

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

@ClearlyClaire ClearlyClaire changed the title Add aged_media_attachments helper method to statuses CLI Remove useless reorder(nil) call in tootctl statuses Dec 7, 2023
@ClearlyClaire ClearlyClaire added this pull request to the merge queue Dec 7, 2023
Merged via the queue into mastodon:main with commit 1d7b823 Dec 7, 2023
28 checks passed
vmstan pushed a commit to vmstan/mastodon that referenced this pull request Dec 14, 2023
vmstan pushed a commit to vmstan/mastodon that referenced this pull request Jan 5, 2024
@mjankowski mjankowski deleted the cli-scope-statuses-media-attachment branch January 11, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Improving code quality ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants