ipython/ipython

ipython Sphinx directive executes code when excluded by only, ifconfig

Chiusa

#9339 aperta il 21 mar 2016

 (3 commenti) (1 reazione) (0 assegnatari)Python (4400 fork)batch import
good first issuehelp wanted

Metriche repository

Star
 (16.095 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

The ipython directive for Sphinx provided by IPython.sphinxext.ipython_directive executes its code block at the parsing stage. As a result, even if an ipython directive is surrounded by an only or ifconfig directive with a false-y condition, the code block is still executed. I have posted a minimum working example for this issue that includes a Sphinx configuration file and a reStructuredText file to reproduce the problem.

Guida contributor