From 0525057326a155cf597a00f76a90f89005501c6a Mon Sep 17 00:00:00 2001 From: layday Date: Mon, 25 Oct 2021 09:42:22 +0300 Subject: [PATCH] docs: evaluate forward references This is to get annotations in `TYPE_CHECKING` blocks to show. --- docs/conf.py | 10 ++++++---- setup.cfg | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6f2d51f63..618c0b478 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,19 +10,19 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -import build - # -- Project information ----------------------------------------------------- +import importlib.metadata + project = 'build' copyright = '2020, Filipe Laíns' author = 'Filipe Laíns' # The short X.Y version -version = build.__version__ +version = importlib.metadata.version('build') # The full version, including alpha/beta/rc tags -release = build.__version__ +release = version # -- General configuration --------------------------------------------------- @@ -67,3 +67,5 @@ autoclass_content = 'both' autodoc_preserve_defaults = True + +set_type_checking_flag = True diff --git a/setup.cfg b/setup.cfg index 022595755..354115831 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,6 +46,7 @@ pipx.run = [options.extras_require] docs = + build[typing] furo>=2021.08.31 sphinx~=4.0 sphinx-argparse-cli>=1.5