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
Raise TypeError for bad arguments to Mv
#80
Raise TypeError for bad arguments to Mv
#80
Conversation
Codecov Report
@@ Coverage Diff @@
## master #80 +/- ##
==========================================
+ Coverage 67.15% 67.32% +0.16%
==========================================
Files 8 8
Lines 4808 4814 +6
==========================================
+ Hits 3229 3241 +12
+ Misses 1579 1573 -6
Continue to review full report at Codecov.
|
def _make_odd(ga, *args, **kwargs): | ||
def _make_odd(ga, __name_or_coeffs, **kwargs): |
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.
Note that unlike even
, odd
accepts not only a name, but coeffs of length l = 1 if ga.n % 2 == 1 else ga.n
, with semantics "set the coeffiencients for the first l
lexicographically sorted elements of each grade to coeffs
". This is nonsense, but tracked in #81 to avoid scope creep.
b05d1ba
to
482199a
Compare
482199a
to
7dc1c09
Compare
Working on the CI failure on this one, the introduced issue is a fair callout |
If `Mv` is passed the wrong number of positional arguments, it used to either silently ignore them, or crash with an unclear message. This would either confuse users, or mask bugs. With this change, it becomes a `TypeError` to pass either too many or too few parameters.
7dc1c09
to
c1458c9
Compare
Milestoning as 0.4.5 since the 2nd commit fixes a regression |
Actually, seems the CI failure isn't that easy to fix. The complaint is the "Assignment Branch Condition" metric is too high in In generally, the function is just a mess because it has way too many overloads, which isn't something we can change anyway. |
codebeat uses pending to indicate there's some style issue. First time it took me some time to figure out that it's not still checking. Bummer. It's just a constant reminder for me. When I touch some code related to the code mess, it will remind me that I could do something about it in the current PR. But I'll just snooze it until next time. But this time, I'll file an issue for it and merge this PR. |
I've reviewed the code and consider it in a good status to merge. But since you haven't requested a review, I don't know if you have finished this work, if yes, please just go ahead and merge. I noticed that #90 is waiting on this. |
If
Mv
is passed the wrong number of positional arguments, it used to either silently ignore them, or crash with an unclear message.This would either confuse users, or mask bugs. With this change, it becomes a
TypeError
to pass either too many or too few parameters.