mypy: correct user_passes_test first argument.

This commit is contained in:
Ethan 2017-05-23 18:37:54 -07:00 committed by Tim Abbott
parent c284d913cc
commit d1bd19a1b8
1 changed files with 1 additions and 1 deletions

View File

@ -308,7 +308,7 @@ def redirect_to_login(next, login_url=None,
# From Django 1.8
def user_passes_test(test_func, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME):
# type: (Callable[[UserProfile], bool], Optional[Text], Text) -> Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]]
# type: (Callable[[HttpResponse], bool], Optional[Text], Text) -> Callable[[Callable[..., HttpResponse]], Callable[..., HttpResponse]]
"""
Decorator for views that checks that the user passes the given test,
redirecting to the log-in page if necessary. The test should be a callable