This doesn't look quite right. The warning probably isn't understandable for a user without looking at the code, so it should say something like "masking the only return value". Then the masking of that value should actually be done, right?

Also, in the test suite the warning should be suppressed by using:

    with warnings.catch_warnings():
        warnings.simplefilter("ignore", UserWarning)