From 4577717bc951aed29d3f5ee7b270e9828092464b Mon Sep 17 00:00:00 2001 From: Valentin <16002514+valentin-cnt@users.noreply.github.com> Date: Thu, 30 Mar 2023 14:23:50 +0200 Subject: [PATCH] Fix the doc filter to check only args values (#416) --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index cfbe50bc6..da52efa49 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -72,9 +72,9 @@ autodoc_preserve_defaults = True # the class docstring. def remove_lines_before_parameters(app, what, name, obj, options, lines): if what == "class": - # ":" represents args values such as :param: or :raises: + # ":param" represents args values first_idx_to_keep = next( - (i for i, line in enumerate(lines) if line.startswith(":")), 0 + (i for i, line in enumerate(lines) if line.startswith(":param")), 0 ) lines[:] = lines[first_idx_to_keep:]