-
-
Notifications
You must be signed in to change notification settings - Fork 212
If a docstring fails assertion checks, output the offending docstring… #458
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
Conversation
… to help the user pinpoint the problem.
|
Do you have an example where this is relevant? |
|
I had an extra newline after |
|
Thanks for clarifying! We don't want to crash in this case, we want to handle the whitespace gracefully. #459 fixes the underlying issue. |
|
Yes, agreed, of course - this is better. I didn't know how strict you wanted to be, and didn't want to presume you'd be OK with relaxing the condition. |
|
All good, thanks. :) As a general rule, docstring conversion should never crash. |
|
What about the |
|
Yes, that's a very fair point. We probably just want to remove that line? Do you want to send a PR? :) |
|
Also, the assertions are there to catch unexpected conditions (unconsidered corner case, or regression) - if they are ever going to fire, the error message may as well be more informative than at present. |
|
Fair point - let's pipe out the docstring in question, but let's not allocate an unneeded error message. :) |
|
Sure, that's fine by me 😄 |
… to help the user pinpoint the problem.