diff --git a/autoapi/_objects.py b/autoapi/_objects.py index 99e0b12e..324db121 100644 --- a/autoapi/_objects.py +++ b/autoapi/_objects.py @@ -280,7 +280,7 @@ def __init__(self, *args, **kwargs): Can be only be: async. """ - self.overloads: list[tuple[str, str]] = [ + self.overloads: list[tuple[str, str | None]] = [ (_format_args(args), return_annotation) for args, return_annotation in self.obj["overloads"] ] diff --git a/docs/changes/523.bugfix.rst b/docs/changes/523.bugfix.rst new file mode 100644 index 00000000..6a0b232e --- /dev/null +++ b/docs/changes/523.bugfix.rst @@ -0,0 +1 @@ +Fix `PythonFunction.overloads` typing when source code overload(s) do not provide a return type