-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CI: Fail build on "UserWarning: Code input with no code at..." #41410
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
Comments
I think that would indeed be good to fail the doc build on such a warning.
The doc build is configured to fail for any Sphinx warning, but this is a plain python warning from the ipyhon directive (https://github.com/ipython/ipython/blob/0e4d6390b2174fb1b352a082b72ad387ae696e87/IPython/sphinxext/ipython_directive.py#L1016-L1023) A relatively easy fix might actually be to fix this upstream and to make that |
Thanks @jorisvandenbossche! I hope to find some time to follow up on this and put in a PR to ipython in a few weeks. |
ipython/ipython#13030 has been merged, to be included in 7.26. Will test after 7.26 is released and can then close this issue. |
@rhshadrach Update: 7.26 was released today. |
Thanks @rhshadrach for fixing this on the IPython side! |
Blank lines in ipython blocks cause the warning "UserWarning: Code input with no code at..." to be emitted when building the docs. #41400 removed the blank lines so there are currently no warnings, but they will likely reappear, specially since double blank lines around classes/functions looks correct. Should we fail the doc build on such a warning (not sure why that doesn't already happen) or enforce this through style checks?
The text was updated successfully, but these errors were encountered: