Skip to content

Commit 5d57d1d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6559d88 commit 5d57d1d

File tree

20 files changed

+36
-37
lines changed

20 files changed

+36
-37
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ cython_debug/
162162

163163
# django static files
164164
staticfiles/
165-
static/CACHE/
165+
static/CACHE/

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ repos:
2020
- id: trailing-whitespace
2121
- id: end-of-file-fixer
2222
- id: debug-statements
23-
- id: requirements-txt-fixer
23+
- id: requirements-txt-fixer

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
66

77
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
88

9-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ migrate:
1010

1111
migrations:
1212
@echo "Creating migration..."
13-
python manage.py makemigrations
13+
python manage.py makemigrations

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Transaction page:
1818
## TODO: update this file with more details
1919

2020
What's left to do:
21-
Check [TODO.md](TODO.md)
21+
Check [TODO.md](TODO.md)

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
- 3 Failed attempts and block user for 24 hours.
55
- Throttle OTP generation
66
- OTP support via third party services
7-
- Support multiple offers with expiry and use the latest offer to give points
7+
- Support multiple offers with expiry and use the latest offer to give points

accounts/admin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ class OTPValidationAdmin(admin.ModelAdmin):
1616
list_display = ("destination", "otp", "valid_until", "is_validated")
1717
list_filter = ("is_validated",)
1818
search_fields = ("destination",)
19-

manage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def main():
88
"""Run administrative tasks."""
9-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rewardme.settings')
9+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rewardme.settings")
1010
try:
1111
from django.core.management import execute_from_command_line
1212
except ImportError as exc:
@@ -18,5 +18,5 @@ def main():
1818
execute_from_command_line(sys.argv)
1919

2020

21-
if __name__ == '__main__':
21+
if __name__ == "__main__":
2222
main()

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Django==4.1.5
22
django-compressor==4.1
3+
django-environ==0.9.0
34
django-extensions==3.2.1
5+
django-flags==5.0.12
46
django-htmx==1.13.0
57
django-simple-history==3.2.0
68
django-sms==0.6.0
79
djangorestframework==3.14.0
10+
pre-commit==2.21.0
811
pytailwindcss==0.1.4
912
requests==2.28.1
10-
pre-commit==2.21.0
11-
django-environ==0.9.0
12-
django-flags==5.0.12
13-
sentry-sdk==1.13.0
13+
sentry-sdk==1.13.0

rewardme/settings.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
2929

3030
# Take environment variables from .env file
31-
environ.Env.read_env(os.path.join(BASE_DIR, '.env'))
31+
environ.Env.read_env(os.path.join(BASE_DIR, ".env"))
3232

3333
# SECURITY WARNING: keep the secret key used in production secret!
34-
SECRET_KEY = env('SECRET_KEY')
34+
SECRET_KEY = env("SECRET_KEY")
3535

3636
# SECURITY WARNING: don't run with debug turned on in production!
37-
DEBUG = env('DEBUG')
37+
DEBUG = env("DEBUG")
3838

39-
ALLOWED_HOSTS = env.list('ALLOWED_HOSTS')
40-
CSRF_TRUSTED_ORIGINS = env.list('CSRF_TRUSTED_ORIGINS')
39+
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS")
40+
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS")
4141

4242
# Application definition
4343

@@ -100,7 +100,7 @@
100100

101101
WSGI_APPLICATION = "rewardme.wsgi.application"
102102

103-
if USE_SQLITE := env('USE_SQLITE'):
103+
if USE_SQLITE := env("USE_SQLITE"):
104104
DATABASES = {
105105
"default": {
106106
"ENGINE": "django.db.backends.sqlite3",
@@ -110,7 +110,7 @@
110110
else:
111111
DATABASES = {
112112
"default": {
113-
'ENGINE': 'django.db.backends.postgresql',
113+
"ENGINE": "django.db.backends.postgresql",
114114
"NAME": env("DB_NAME"),
115115
"USER": env("DB_USER"),
116116
"PASSWORD": env("DB_PASSWORD"),
@@ -159,9 +159,9 @@
159159
STATIC_ROOT = BASE_DIR / "staticfiles"
160160
COMPRESS_ENABLED = True
161161
STATICFILES_FINDERS = (
162-
'django.contrib.staticfiles.finders.FileSystemFinder',
163-
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
164-
'compressor.finders.CompressorFinder',
162+
"django.contrib.staticfiles.finders.FileSystemFinder",
163+
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
164+
"compressor.finders.CompressorFinder",
165165
)
166166

167167
# Default primary key field type
@@ -185,14 +185,14 @@
185185
)
186186

187187
# Sentry
188-
if USE_SENTRY := env.bool('USE_SENTRY', default=False):
188+
if USE_SENTRY := env.bool("USE_SENTRY", default=False):
189189
import sentry_sdk
190190
from sentry_sdk.integrations.django import DjangoIntegration
191191

192192
sentry_sdk.init(
193-
dsn=env('SENTRY_DSN'),
193+
dsn=env("SENTRY_DSN"),
194194
integrations=[DjangoIntegration()],
195-
traces_sample_rate=env.float('SENTRY_TRACES_SAMPLE_RATE', default=0.1),
195+
traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0.1),
196196
send_default_pii=True,
197-
release=env('SENTRY_RELEASE'),
197+
release=env("SENTRY_RELEASE"),
198198
)

0 commit comments

Comments
 (0)