Skip to content

Commit bb15b0d

Browse files
committed
pep8
1 parent 55754de commit bb15b0d

File tree

11 files changed

+21
-37
lines changed

11 files changed

+21
-37
lines changed

backend/credits/admin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
from django.contrib import admin
2-
31
# Register your models here.

backend/credits/models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
from django.db import models
2-
31
# Create your models here.

backend/credits/tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
from django.test import TestCase
2-
31
# Create your tests here.

backend/credits/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
from django.shortcuts import render
2-
31
# Create your views here.

backend/debits/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
from django.shortcuts import render
2-
31
# Create your views here.

backend/events/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ def run_task_event_type():
7979
try:
8080
getattr(tasks, instance.event_type.replace(".", "_")
8181
).apply_async(kwargs={"event_id": instance.id})
82-
except:
82+
except Exception:
8383
pass
8484
transaction.on_commit(run_task_event_type)

backend/events/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class DebitBatchCompleted(Task):
88
"""
99
"""
1010
name = "maguire.events.tasks.debit_batch_completed"
11-
l = get_task_logger(__name__)
11+
tl = get_task_logger(__name__)
1212

1313
def run(self, event_id, **kwargs):
1414
# trigger hook

backend/maguire/schema.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44

55
class Query(
6-
debits.schema.Query,
7-
graphene.ObjectType):
8-
pass
6+
debits.schema.Query,
7+
graphene.ObjectType):
8+
pass
99

1010

1111
class Mutation(
12-
debits.schema.Mutation,
13-
graphene.ObjectType):
14-
pass
12+
debits.schema.Mutation,
13+
graphene.ObjectType):
14+
pass
1515

1616

1717
schema = graphene.Schema(query=Query, mutation=Mutation)

backend/maguire/testsettings.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from maguire.settings import * # flake8: noqa
1+
from maguire.settings import * # noqa
2+
import json
3+
import os
24

35
# SECURITY WARNING: keep the secret key used in production secret!
46
SECRET_KEY = 'TESTSEKRET'
@@ -27,5 +29,8 @@
2729

2830
BASE_URL = os.environ.get('BASE_URL', 'http://localhost:8000')
2931

30-
DEBIT_CONFIG = json.loads(os.environ.get('DEBIT_CONFIG', '{"base_url": "https://www.slowdebit.co.za:8888/Services/PaymentService.svc/PartnerServices/","authentication": {"service_reference": "37H2-F00Z-735Q-1B11","username": "uname"},"bank_ref": "PICSA","group_code": "PICSA"}'))
31-
32+
DEBIT_CONFIG = json.loads(os.environ.get(
33+
'DEBIT_CONFIG',
34+
'{"base_url": "https://www.slowdebit.co.za:8888/Services/PaymentService.svc/'
35+
'PartnerServices/","authentication": {"service_reference": "37H2-F00Z-735Q-1B11",'
36+
'"username": "uname"},"bank_ref": "PICSA","group_code": "PICSA"}'))

backend/maguire/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def graphql_token_view():
2626
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
2727
url(r'^admin/', admin.site.urls),
2828
url(r'^graphql', graphql_token_view()),
29-
url(r'^graphiql', staff_member_required(csrf_exempt(GraphQLView.as_view(schema=schema, graphiql=True)))),
29+
url(r'^graphiql', staff_member_required(csrf_exempt(
30+
GraphQLView.as_view(schema=schema, graphiql=True)))),
3031
url(r'^api/rest-auth/', include('rest_auth.urls')),
3132
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

backend/manage.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@
44

55
if __name__ == "__main__":
66
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "maguire.settings")
7-
try:
8-
from django.core.management import execute_from_command_line
9-
except ImportError:
10-
# The above import may fail for some other reason. Ensure that the
11-
# issue is really that Django is missing to avoid masking other
12-
# exceptions on Python 2.
13-
try:
14-
import django
15-
except ImportError:
16-
raise ImportError(
17-
"Couldn't import Django. Are you sure it's installed and "
18-
"available on your PYTHONPATH environment variable? Did you "
19-
"forget to activate a virtual environment?"
20-
)
21-
raise
7+
8+
from django.core.management import execute_from_command_line
9+
2210
execute_from_command_line(sys.argv)

0 commit comments

Comments
 (0)