Skip to content

Commit

Permalink
no type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouchy committed Jan 16, 2020
1 parent 0e26c49 commit 0904c28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stronghold/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
STRONGHOLD_PUBLIC_NAMED_URLS = getattr(settings, "STRONGHOLD_PUBLIC_NAMED_URLS", ())


def is_authenticated(user) -> bool:
def is_authenticated(user):
""" make compatible with django 1 and 2 """
try:
return user.is_authenticated()
except TypeError:
return user.is_authenticated


def test_request(request, view_func, view_args, view_kwargs) -> bool:
def test_request(request, view_func, view_args, view_kwargs):
"""
Default test against request in middleware.
Expand Down

0 comments on commit 0904c28

Please sign in to comment.