beartype / plum

Multiple dispatch in Python
https://beartype.github.io/plum
MIT License
497 stars 22 forks source link

Add test case from #117 checking for varargs ambiguity #150

Closed PhilipVinc closed 2 weeks ago

PhilipVinc commented 2 weeks ago

I recently noticed that for some reason a test case I had added in #119 that previously did not pass test, now pass.

The test is that the following raises an AmbiguousLookupError

def f(x : int, *y: A):
 pass
def f(x: int, *y : B):
 pass

f(1)

I would like to add this to the test set of plum just so that it's included.

Note that #117 is still not solved as we still do not pass this other test

assert Sig(int, varargs=int) < Sig(int, Num)

but that's a step in the right direction...

coveralls commented 2 weeks ago

Pull Request Test Coverage Report for Build 9077591603

Details


Totals Coverage Status
Change from base Build 9075861722: 0.0%
Covered Lines: 1226
Relevant Lines: 1227

💛 - Coveralls
wesselb commented 2 weeks ago

Thanks, this looks great! :) Merging right away.