blacken-docs icon indicating copy to clipboard operation
blacken-docs copied to clipboard

Parsing error with rst files with testsetup directive

Open astrofrog opened this issue 1 year ago • 0 comments

Python Version

3.11.2

Package Version

1.16

Description

When trying to use blacken-docs with the documentation for one of my packages, blacken-docs is encountering a parsing error. A MWE version of the file I am formatting is:

Example
=======

.. testsetup::

    >>> import numpy as np

Running this through blacken-docs results in:

test.rst:4: code block parse error Cannot parse: 1:0: >>> import numpy as np

astrofrog avatar Nov 28 '23 14:11 astrofrog