Skip to content

Commit

Permalink
Do not mark overloaded functions with css class .long-signature
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Dec 13, 2024
1 parent 668f4d0 commit 7fc2b10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pydoctor/templatewriter/pages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ def format_function_def(func_name: str, is_async: bool,
func_name = func_name[:func_name.rindex('.')]

func_signature_css_class = 'function-signature'
if epydoc2stan.function_signature_len(func) > LONG_SIGNATURE:

# We never mark the overloaded functions as long since this could make the output of pydoctor
# worst that before when there are many overloads to be wrapped. It allows to
# to scroll less to get to the actual main documentation of the function.
if not isinstance(func, model.FunctionOverload) and \
epydoc2stan.function_signature_len(func) > LONG_SIGNATURE:
func_signature_css_class += ' long-signature'

r.extend([
Expand Down

0 comments on commit 7fc2b10

Please sign in to comment.