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:]