From a81725927c3ee832a84fcbb807aae1fa5780f719 Mon Sep 17 00:00:00 2001 From: mauricesvp Date: Thu, 28 Mar 2024 09:38:43 +0100 Subject: [PATCH 1/2] Don't render 'Args' if no params --- doq/templates/google/def.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doq/templates/google/def.txt b/doq/templates/google/def.txt index e387123..33e873c 100644 --- a/doq/templates/google/def.txt +++ b/doq/templates/google/def.txt @@ -1,9 +1,11 @@ """{{ name }}. +{% if params %} Args: {%- for p in params %} {{ p.argument }}{% if p.annotation %} ({{ p.annotation }}): {{ p.argument }}{% else %}:{% endif -%} {% endfor %} +{% endif -%} {% if return_type %} Returns: {{ return_type }}: From 8503dc8612dacfa249b73d759995deb15bd42b68 Mon Sep 17 00:00:00 2001 From: mauricesvp Date: Thu, 28 Mar 2024 09:58:21 +0100 Subject: [PATCH 2/2] fix google def template --- doq/templates/google/def.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doq/templates/google/def.txt b/doq/templates/google/def.txt index 33e873c..1d05aed 100644 --- a/doq/templates/google/def.txt +++ b/doq/templates/google/def.txt @@ -1,6 +1,6 @@ """{{ name }}. +{% if params -%} -{% if params %} Args: {%- for p in params %} {{ p.argument }}{% if p.annotation %} ({{ p.annotation }}): {{ p.argument }}{% else %}:{% endif -%}