Skip to content

Commit

Permalink
Fix new linter error W605 and pin flake8 version
Browse files Browse the repository at this point in the history
  • Loading branch information
zvyn committed May 25, 2019
1 parent f0daed0 commit 5b2dfd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oidc_provider/lib/utils/oauth2.py
Expand Up @@ -21,7 +21,7 @@ def extract_access_token(request):
"""
auth_header = request.META.get('HTTP_AUTHORIZATION', '')

if re.compile('^[Bb]earer\s{1}.+$').match(auth_header):
if re.compile(r'^[Bb]earer\s{1}.+$').match(auth_header):
access_token = auth_header.split()[1]
else:
access_token = request.GET.get('access_token', '')
Expand All @@ -39,7 +39,7 @@ def extract_client_auth(request):
"""
auth_header = request.META.get('HTTP_AUTHORIZATION', '')

if re.compile('^Basic\s{1}.+$').match(auth_header):
if re.compile(r'^Basic\s{1}.+$').match(auth_header):
b64_user_pass = auth_header.split()[1]
try:
user_pass = b64decode(b64_user_pass).decode('utf-8').split(':')
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -11,6 +11,7 @@ changedir=
deps =
mock
psycopg2
flake8==3.7.7
pytest==3.6.4
pytest-django
pytest-flake8
Expand Down

0 comments on commit 5b2dfd2

Please sign in to comment.