Composes a Python-style call signature string for a method or function.

Returns:

A signature string such as “name(self, x: int) -> str”.

Methods

_compile_py_signature

_compile_py_signature(name: str, parameters: List, return_type: Optional, has_self: bool) -> str

Composes a Python-style call signature string for a method or function.

Returns:

A signature string such as “name(self, x: int) -> str”.

ParameterTypeDescription
namestrThe method or function name.
parametersListParsed parameters to render, in order.
return_typeOptionalThe return type annotation text, or None/empty to omit it.
has_selfboolWhether to prepend a bare self parameter.

Generated with Flude

Copyright © 2026