Skip to content

Commit 6b27245

Browse files
committed
Run code-quality tools
1 parent 137d074 commit 6b27245

File tree

13 files changed

+32
-17
lines changed

13 files changed

+32
-17
lines changed

project/config/wsgi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
environ.Env.read_env(str(ROOT_DIR + '.env'))
2828

2929

30-
3130
if env.bool('USE_SENTRY', False):
3231
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
3332

project/velkoja/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-

project/velkoja/admin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from django.contrib import admin
23

34
# Register your models here.

project/velkoja/holvichecker.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
# -*- coding: utf-8 -*-
12
import logging
23
from decimal import Decimal
3-
from django.utils import timezone
4+
45
from django.conf import settings
5-
from holviapp.utils import list_invoices
6-
from holviapi.utils import barcode as bank_barcode
7-
from .models import NotificationSent
86
from django.core.mail import EmailMessage
97
from django.template import Context
108
from django.template.loader import get_template
9+
from django.utils import timezone
10+
from holviapi.utils import barcode as bank_barcode
11+
from holviapp.utils import list_invoices
12+
13+
from .models import NotificationSent
1114

1215
logger = logger.getLogger()
1316

17+
1418
class HolviOverdueInvoicesHandler(object):
1519
def process_overdue(self, send=False):
1620
barcode_iban = settings.HOLVI_BARCODE_IBAN
@@ -36,8 +40,8 @@ def process_overdue(self, send=False):
3640
barcode = bank_barcode(barcode_iban, invoice.rf_reference, Decimal(invoice.due_sum))
3741

3842
mail = EmailMessage()
39-
mail.subject = subject_template.render(Context({ "invoice": invoice, "barcode": barcode })).strip()
40-
mail.body = body_template.render(Context({ "invoice": invoice, "barcode": barcode }))
43+
mail.subject = subject_template.render(Context({"invoice": invoice, "barcode": barcode})).strip()
44+
mail.body = body_template.render(Context({"invoice": invoice, "barcode": barcode}))
4145
mail.to = [invoice.receiver.email]
4246
if send:
4347
try:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-

project/velkoja/management/commands/check_holvi_overdue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from django.core.management.base import BaseCommand, CommandError
33
from velkoja.holvichecker import HolviOverdueInvoicesHandler
44

5+
56
class Command(BaseCommand):
67
help = 'Import transaction data from Holvi API'
78

@@ -12,5 +13,5 @@ def handle(self, *args, **options):
1213
handler = HolviOverdueInvoicesHandler()
1314
notified = handler.process_overdue(send=True)
1415
if options['verbosity'] > 1:
15-
for n,i in notified:
16+
for n, i in notified:
1617
print("Notified %s about %s" % (n.email, i.subject))

project/velkoja/migrations/0001_initial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
from django.db import migrations, models
54
import django.utils.timezone
5+
from django.db import migrations, models
6+
67
import asylum.mixins
78

89

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-

project/velkoja/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from django.db import models, transaction
23
from django.utils import timezone
34
from django.utils.translation import ugettext_lazy as _

0 commit comments

Comments
 (0)