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
validation of pivot
in quiver
#3951
Comments
The present situation is the result of my minimalist approach when I wrote it. In the history of mpl, strict validation of inputs has been inconsistent, to say the least. |
Fair enough. This is all sort of balled up with how we auto-fleshout the docstrings as well. I am working on a proposal to piggy back on the mechanism that function annotations use in pythen3 (http://python-future.org/func_annotations.html) to put the information used for validation and for building the docstrings in exactly one place (and my working on I need to figure out if it will work). |
only accept {'mid', 'middle', 'tip', 'tail'} instead of being super permissive. Closes matplotlib#3951
only accept {'mid', 'middle', 'tip', 'tail'} instead of being super permissive. Closes matplotlib#3951
…aused error using matplotlib 1.5+. Matplotlib tightened validation of pivot in quiver, 'start' is no longer allowed, which was wrong and default of 'tail' was used. See matplotlib/matplotlib#3951
Noted as part of #3907, the inputs on
pivot
for quiver is very permissive and will take 'mid' or 'middle', however it will also work with out exception with any string input (by just silently falling back to 'tail'):I propose that a) we validate the input to be in
{'tip', 'tail', 'mid', 'middle'}
and accept but warn anything else down totail
for one version before raising.The text was updated successfully, but these errors were encountered: