summaryrefslogtreecommitdiffstats
path: root/accounts/utils/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/utils/__init__.py')
-rw-r--r--accounts/utils/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/accounts/utils/__init__.py b/accounts/utils/__init__.py
index 1f79953..dfb02af 100644
--- a/accounts/utils/__init__.py
+++ b/accounts/utils/__init__.py
@@ -4,14 +4,16 @@ from functools import wraps
from flask import render_template, request, Flask
from wtforms.validators import Regexp, ValidationError
-from typing import Optional
+from typing import Optional, Callable, Any
# using http://flask.pocoo.org/docs/patterns/viewdecorators/
-def templated(template: Optional[str] = None):
- def templated_(f):
+def templated(
+ template: Optional[str] = None,
+) -> Callable[..., Callable[..., str]]:
+ def templated_(f: Callable[..., str]) -> Callable[..., str]:
@wraps(f)
- def templated__(*args, **kwargs):
+ def templated__(*args: list[Any], **kwargs: dict[str, Any]) -> str:
template_name = template
if template_name is None:
if request.endpoint: