Open
Description
With autodoc (.. automodule:: ...
),
if sys.version_info < (3, 8, 0):
from typing_extensions import Literal # this line
else:
from typing import Literal
causes "expected indented block" error.
To Reproduce
Steps to reproduce the behavior:
<Paste your command-line here which cause the problem>
$ git clone https://github.com/achimnol/aiotools
$ cd aiotools
$ pip install -r requirements/dev.txt
$ cd docs
$ make html
Expected behavior
It should build the docs.
Environment info
- OS: Linux (Ubuntu 20.04)
- Python version: 3.9.5
- Sphinx version: 4.0.1, 4.1.0dev installed from GitHub
- Sphinx extensions: sphinx.ext.autodoc, sphinx_autodoc_typehints