Skip to content

Commit 5df322d

Browse files
committed
chore: added return type
1 parent 4131c4b commit 5df322d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/python/package/services/service.py.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from ..service import Service
2-
from typing import List
2+
from typing import List, Dict, Any
33
from ..exception import AppwriteException
44
{% set added = [] %}
55
{% for method in service.methods %}
@@ -24,11 +24,11 @@ from ..enums.{{ name | caseSnake }} import {{ name | caseUcfirst }};
2424

2525
class {{ service.name | caseUcfirst }}(Service):
2626

27-
def __init__(self, client):
27+
def __init__(self, client) -> None:
2828
super({{ service.name | caseUcfirst }}, self).__init__(client)
2929
{% for method in service.methods %}
3030

31-
def {{ method.name | caseSnake }}(self{% if method.parameters.all|length > 0 %}, {% endif %}{% for parameter in method.parameters.all %}{{ parameter.name | escapeKeyword | caseSnake }}: {{ parameter | getPropertyType(method) | raw }}{% if not parameter.required %} = None{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}{% if 'multipart/form-data' in method.consumes %}, on_progress = None{% endif %}):
31+
def {{ method.name | caseSnake }}(self{% if method.parameters.all|length > 0 %}, {% endif %}{% for parameter in method.parameters.all %}{{ parameter.name | escapeKeyword | caseSnake }}: {{ parameter | getPropertyType(method) | raw }}{% if not parameter.required %} = None{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}{% if 'multipart/form-data' in method.consumes %}, on_progress = None{% endif %}) -> Dict[str, Any]:
3232
"""
3333
{{ method.description | replace({"\n": "\n "}) }}
3434
{% if method.parameters.all|length > 0 or 'multipart/form-data' in method.consumes %}

0 commit comments

Comments
 (0)