Skip to content

Commit 7ac89cf

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b07c887 commit 7ac89cf

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

HisabKitab/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
For the full list of settings and their values, see
1010
https://docs.djangoproject.com/en/1.11/ref/settings/
1111
"""
12+
1213
import os
1314

1415
from .custom_settings import *

HisabKitab/test_settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
With these settings, tests run faster.
33
"""
4+
45
import os
56

67
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

HisabKitab/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
1. Import the include() function: from django.conf.urls import url, include
1414
2. Add a URL to urlpatterns: path(r'^blog/', include('blog.urls'))
1515
"""
16+
1617
from django.contrib import admin
1718
from django.contrib.auth.views import LoginView
1819
from django.urls import include, path, re_path

HisabKitab/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
For more information on this file, see
77
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
88
"""
9+
910
import os
1011

1112
from django.core.wsgi import get_wsgi_application

users/tests/test_managers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for drf_user/managers.py module"""
2+
23
from django.contrib.auth import get_user_model
34
from django.test import TestCase
45
from faker import Faker

users/tests/test_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for drf_user/utils.py module"""
2+
23
import datetime
34
from unittest.mock import ANY, MagicMock, patch
45

users/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ def validate_otp(value, otp):
170170
data["OTP"] = "Attempt exceeded! OTP has been reset!"
171171
else:
172172
otp_object.save()
173-
data[
174-
"OTP"
175-
] = f"OTP Validation failed! {otp_object.validate_attempt} attempts left!"
173+
data["OTP"] = (
174+
f"OTP Validation failed! {otp_object.validate_attempt} attempts left!"
175+
)
176176
status_code = status.HTTP_401_UNAUTHORIZED
177177
except OTPValidation.DoesNotExist:
178178
# If OTP object doesn't exist set proper message and status_code
@@ -205,9 +205,9 @@ def send_otp(prop: str, value: str, otpobj: OTPValidation, recip: str) -> dict:
205205
rdata = {"success": False, "message": None}
206206

207207
if otpobj.reactive_at > datetime.datetime.now():
208-
rdata[
209-
"message"
210-
] = f"OTP sending not allowed until: {otpobj.reactive_at.strftime('%d-%h-%Y %H:%M:%S')}"
208+
rdata["message"] = (
209+
f"OTP sending not allowed until: {otpobj.reactive_at.strftime('%d-%h-%Y %H:%M:%S')}"
210+
)
211211
return rdata
212212

213213
message = (

0 commit comments

Comments
 (0)