Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix autobpm and improve its docs #5389
Fix autobpm and improve its docs #5389
Changes from all commits
03cf567
49cae5c
5b5c564
e3776f1
ee2f114
3c51128
8f02020
591e04a
111686e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the unused arguments should be marked, but I think their names should be preserved, i.e. using
_opts
instead of just_
. It's just a bit clearer, especially since the whole codebase isn't well-typed yet. Also, a type annotation should still be used for the argument.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree regarding general clarity, but do you reckon this is needed here given that this argument is unused? I find that
_
in such case clearly communicates that. I find the presence of the type a bit confusing if the argument is not used.Note that my opinion here is mostly based on refactoring interfaces like the one that
BeetsPlugin
provides: in this case using_
notation allows the interface (and the type) to change without the need to update the code here.Essentially, I'm applying the ISP principle to the function arguments here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, I'm just not used to it. Any preference, @Serene-Arc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking, there's no security considerations here, right? cc @Serene-Arc