-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Rename error #2523
Rename error #2523
Conversation
@discopatrick, thanks for your PR! By analyzing the history of the files in this pull request, we identified @geigerzaehler, @PierreRust and @sampsyo to be potential reviewers. |
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.
Can you (re)write you commit messages in the imperative voice and capitalise them?
Would also be great if you would state your reasoning for the changes in your commits directly in the commit message. 10 years from now, beets's source might not be tracked on GitHub anymore and any information and reasoning you've added to the pull request but not in the commits might be lost.
(The code itself looks fine, at a glance.)
Hi @Freso, sure, I'm happy to bring my commit messages in line with the repository convention. I'm trying to follow this guide to do this: https://help.github.com/articles/changing-a-commit-message/#amending-older-or-multiple-commit-messages ...but I'm having some problems. Here's what I'm doing:
Then I choose which commits to rename (there are other commits from merged branches here):
I can get as far as rewriting the most recent message, but then:
I think this is something to do with the fact that there are merged branches here (I merged master into my feature branch just before my most recent commit). I'm guessing this means I can't rewrite those commit messages as I'd have to rewrite the history of other branches too? (Edited to add: those commits are also already merged into |
Yes, don't rewrite history for commits that are already in beets' |
…rror` The way we use `InvalidQueryArgumentTypeError` is more akin to a `ValueError` than a `TypeError`. For example, we try to parse a string as an int, float, or date, but the parsing fails - there was nothing wrong with the type of the variable (string), but its contents were not parseable into the type we wanted - there was a problem with the value of the string.
# Conflicts: # beets/dbcore/query.py
The incorrect error type was reintroduced in the previous merge commit.
067bc30
to
d24b373
Compare
I managed to find a way to edit commit messages that are prior to a merge! I had to add the |
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.
This looks great; thanks for doing the renaming! I would have even been fine with the shorter name InvalidQueryArgumentError, but this one is perfectly fine too.
Looks like you've addressed @Freso's suggestions about commit messages, so I'll merge this now. Thank you for taking care of this! ✨ 🐟 ❗ |
As discussed at #2517 (comment), the way we use
InvalidQueryArgumentTypeError
is more akin to aValueError
than aTypeError
. For example, we try to parse a string as an int, float, or date, but the parsing fails - there was nothing wrong with the Type of the variable (string), but its contents were not parseable into the type we wanted - there was a problem with the value of the string.Thus
InvalidQueryArgumentTypeError
is renamed toInvalidQueryArgumentValueError
in this pull request.