Open KubaO opened 1 month ago
Similar issues appear to happen in docstrings. Something like this:
class A:
# autopep8: off
"""Docstring
.. code-block::python
print(1)
print (2)
"""
# autopep8: on
autopep8 still insists on removing whitespace on the blank lines within the code example. This actually generates warnings/errors in documentation generators link Sphinx, and I don't have a workaround at the moment.
autopep8 off/on doesn't work
Before formatting:
After:
The workaround is to add a semicolon and join the
import
line with the non-import line(s):Originally posted by @PlatonB in https://github.com/hhatto/autopep8/issues/460#issuecomment-1593174293